sqllogictest
Artifact Content
Not logged in

Artifact 99aaf19cf5076944faf1eaabfcfddc3fe90e99d7:


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,685,90.80,'ctgne',485,409.52,'luppj')

statement ok
INSERT INTO tab0 VALUES(1,214,652.45,'tajhw',810,556.75,'pzuya')

statement ok
INSERT INTO tab0 VALUES(2,667,617.88,'qmyhk',153,526.38,'laibo')

statement ok
INSERT INTO tab0 VALUES(3,259,242.59,'jtlxm',363,676.63,'mxriq')

statement ok
INSERT INTO tab0 VALUES(4,130,13.41,'rgxwm',527,652.84,'wtvhz')

statement ok
INSERT INTO tab0 VALUES(5,970,770.10,'jaxbj',593,517.9,'kkqps')

statement ok
INSERT INTO tab0 VALUES(6,641,831.98,'qyxcb',994,877.86,'yfpfg')

statement ok
INSERT INTO tab0 VALUES(7,805,117.58,'dudxi',276,1.62,'elhko')

statement ok
INSERT INTO tab0 VALUES(8,547,280.22,'zpxkd',720,951.46,'yafei')

statement ok
INSERT INTO tab0 VALUES(9,1,822.67,'ajqco',970,704.74,'kdgyx')

statement ok
INSERT INTO tab0 VALUES(10,975,225.77,'xqasd',654,278.67,'aymeq')

statement ok
INSERT INTO tab0 VALUES(11,576,77.4,'gfdvt',14,857.0,'talyw')

statement ok
INSERT INTO tab0 VALUES(12,835,189.32,'ssnny',526,918.56,'echra')

statement ok
INSERT INTO tab0 VALUES(13,332,732.39,'aekwy',529,352.98,'ruvqy')

statement ok
INSERT INTO tab0 VALUES(14,818,350.59,'ktuuu',847,590.23,'kxsqs')

statement ok
INSERT INTO tab0 VALUES(15,848,293.45,'jhmmo',416,731.30,'pmota')

statement ok
INSERT INTO tab0 VALUES(16,396,541.32,'bzkci',908,665.80,'oaarh')

statement ok
INSERT INTO tab0 VALUES(17,488,923.99,'fznll',358,198.60,'wkyqn')

statement ok
INSERT INTO tab0 VALUES(18,821,252.30,'nydmp',784,175.44,'kkowu')

statement ok
INSERT INTO tab0 VALUES(19,395,441.80,'mwvcw',819,609.56,'rfmed')

statement ok
INSERT INTO tab0 VALUES(20,129,632.33,'rkvob',329,803.34,'qgyss')

statement ok
INSERT INTO tab0 VALUES(21,494,321.70,'xwwhn',44,478.89,'csuqz')

statement ok
INSERT INTO tab0 VALUES(22,135,482.26,'glnlp',179,894.72,'ucvmv')

statement ok
INSERT INTO tab0 VALUES(23,493,694.55,'ffflm',61,976.33,'gbrzr')

statement ok
INSERT INTO tab0 VALUES(24,435,263.95,'vkktn',752,444.84,'iucsm')

statement ok
INSERT INTO tab0 VALUES(25,877,348.25,'xjrlf',677,930.65,'ataqc')

statement ok
INSERT INTO tab0 VALUES(26,409,88.31,'zxwtl',245,108.99,'sitrg')

statement ok
INSERT INTO tab0 VALUES(27,917,726.70,'odftp',480,820.65,'hlznr')

statement ok
INSERT INTO tab0 VALUES(28,215,731.28,'ewkcn',639,199.49,'fczcg')

statement ok
INSERT INTO tab0 VALUES(29,662,928.86,'nnwjx',842,788.16,'tetfd')

statement ok
INSERT INTO tab0 VALUES(30,793,619.82,'rnsbf',695,680.68,'aucfy')

statement ok
INSERT INTO tab0 VALUES(31,943,710.72,'dyxvx',915,627.5,'deurs')

statement ok
INSERT INTO tab0 VALUES(32,867,836.93,'whokm',955,177.93,'ggpve')

statement ok
INSERT INTO tab0 VALUES(33,373,485.28,'oytdq',630,790.22,'ybplx')

statement ok
INSERT INTO tab0 VALUES(34,939,124.64,'uyymn',741,969.68,'ysdgh')

statement ok
INSERT INTO tab0 VALUES(35,346,322.58,'zlxwr',702,383.59,'qrzru')

statement ok
INSERT INTO tab0 VALUES(36,294,878.0,'pnzde',160,992.35,'zqnjy')

statement ok
INSERT INTO tab0 VALUES(37,36,944.71,'jqdfw',627,171.12,'qcuxr')

statement ok
INSERT INTO tab0 VALUES(38,997,151.11,'gjasl',97,838.42,'fvrmg')

statement ok
INSERT INTO tab0 VALUES(39,401,733.77,'rzgso',680,574.79,'ftajl')

statement ok
INSERT INTO tab0 VALUES(40,896,653.9,'qbldy',219,755.40,'jispr')

statement ok
INSERT INTO tab0 VALUES(41,178,727.90,'tfipn',921,669.64,'ojwsg')

statement ok
INSERT INTO tab0 VALUES(42,617,749.9,'mnxwp',975,647.81,'clxde')

statement ok
INSERT INTO tab0 VALUES(43,884,620.26,'hioow',187,187.71,'tvscs')

statement ok
INSERT INTO tab0 VALUES(44,572,462.31,'ovdvs',595,77.24,'xusbb')

statement ok
INSERT INTO tab0 VALUES(45,822,759.6,'zqfvd',100,519.8,'tlaiw')

statement ok
INSERT INTO tab0 VALUES(46,950,468.94,'lmbna',89,259.28,'ihrwa')

statement ok
INSERT INTO tab0 VALUES(47,71,153.54,'juweg',60,709.88,'otmrc')

statement ok
INSERT INTO tab0 VALUES(48,723,103.25,'qgubt',249,69.56,'qbnqg')

statement ok
INSERT INTO tab0 VALUES(49,495,463.94,'xocyq',252,458.24,'xoxyi')

statement ok
INSERT INTO tab0 VALUES(50,645,356.51,'obmxj',650,34.73,'eoexf')

statement ok
INSERT INTO tab0 VALUES(51,736,8.57,'zeuwz',638,124.34,'oxgls')

statement ok
INSERT INTO tab0 VALUES(52,250,875.3,'ofnfx',646,342.50,'aoruw')

statement ok
INSERT INTO tab0 VALUES(53,221,764.76,'wzvjm',965,721.39,'dfrbx')

statement ok
INSERT INTO tab0 VALUES(54,854,962.16,'uinos',373,834.59,'jagyo')

statement ok
INSERT INTO tab0 VALUES(55,155,360.85,'sukis',758,920.64,'edkfa')

statement ok
INSERT INTO tab0 VALUES(56,554,576.25,'lfdep',748,9.74,'cifmc')

statement ok
INSERT INTO tab0 VALUES(57,527,84.24,'pnser',327,47.34,'bpxul')

statement ok
INSERT INTO tab0 VALUES(58,227,334.73,'oagsr',469,20.76,'eycdp')

statement ok
INSERT INTO tab0 VALUES(59,104,881.34,'plgws',759,83.81,'evugb')

statement ok
INSERT INTO tab0 VALUES(60,533,507.1,'bevjp',17,681.45,'jvpdp')

statement ok
INSERT INTO tab0 VALUES(61,437,349.61,'ndpxr',925,670.38,'uiure')

statement ok
INSERT INTO tab0 VALUES(62,913,22.57,'uiaxi',652,454.67,'jbngd')

statement ok
INSERT INTO tab0 VALUES(63,857,745.53,'flmgs',478,100.40,'avwmk')

statement ok
INSERT INTO tab0 VALUES(64,589,464.91,'omfqg',417,466.29,'ucxsn')

statement ok
INSERT INTO tab0 VALUES(65,478,981.61,'jmumm',848,326.28,'zmzuw')

statement ok
INSERT INTO tab0 VALUES(66,564,74.56,'zxwig',135,496.22,'epukp')

statement ok
INSERT INTO tab0 VALUES(67,191,626.39,'ppprx',253,956.45,'poldb')

statement ok
INSERT INTO tab0 VALUES(68,623,748.7,'qdpjl',411,979.42,'yppro')

statement ok
INSERT INTO tab0 VALUES(69,673,905.46,'mndln',684,254.35,'sspsv')

statement ok
INSERT INTO tab0 VALUES(70,330,40.3,'zyfqo',631,8.85,'jirjy')

statement ok
INSERT INTO tab0 VALUES(71,380,699.41,'jftyb',922,139.49,'fvzcn')

statement ok
INSERT INTO tab0 VALUES(72,34,158.7,'lmqmn',961,331.51,'sisyv')

statement ok
INSERT INTO tab0 VALUES(73,550,545.89,'rxyvt',520,188.38,'rdhnw')

statement ok
INSERT INTO tab0 VALUES(74,862,967.84,'idzxv',352,353.45,'ellio')

statement ok
INSERT INTO tab0 VALUES(75,201,636.56,'pclii',821,633.58,'ubjqx')

statement ok
INSERT INTO tab0 VALUES(76,724,991.2,'tnoii',531,132.73,'suuzz')

statement ok
INSERT INTO tab0 VALUES(77,133,823.13,'gqcds',945,364.66,'zietf')

statement ok
INSERT INTO tab0 VALUES(78,308,406.34,'wqruf',11,388.46,'jtvyi')

statement ok
INSERT INTO tab0 VALUES(79,927,612.32,'tovol',791,927.24,'rbyqr')

statement ok
INSERT INTO tab0 VALUES(80,90,46.54,'rraue',83,494.75,'xzvtf')

statement ok
INSERT INTO tab0 VALUES(81,947,165.91,'bgwki',45,521.97,'fmyor')

statement ok
INSERT INTO tab0 VALUES(82,321,404.39,'ceglg',822,479.77,'dldlr')

statement ok
INSERT INTO tab0 VALUES(83,336,301.67,'akmyq',169,5.53,'ugrjx')

statement ok
INSERT INTO tab0 VALUES(84,37,624.72,'ywhhx',80,28.72,'ujiqe')

statement ok
INSERT INTO tab0 VALUES(85,18,494.45,'jwcbb',409,893.62,'nesln')

statement ok
INSERT INTO tab0 VALUES(86,51,510.35,'ywdmb',496,484.82,'ihdmn')

statement ok
INSERT INTO tab0 VALUES(87,701,876.9,'wxker',792,355.98,'mlwrc')

statement ok
INSERT INTO tab0 VALUES(88,962,522.16,'tnarx',486,846.33,'izjqz')

statement ok
INSERT INTO tab0 VALUES(89,872,233.48,'aaeey',126,217.38,'oncmp')

statement ok
INSERT INTO tab0 VALUES(90,147,774.5,'wlhbf',248,767.52,'dobig')

statement ok
INSERT INTO tab0 VALUES(91,799,10.55,'kyhos',999,962.63,'qcnwi')

statement ok
INSERT INTO tab0 VALUES(92,766,39.97,'tolja',762,558.72,'cijfj')

statement ok
INSERT INTO tab0 VALUES(93,534,307.24,'itwgj',782,729.56,'kehhc')

statement ok
INSERT INTO tab0 VALUES(94,760,744.87,'ubeuv',790,189.28,'jyrpu')

statement ok
INSERT INTO tab0 VALUES(95,905,879.54,'etdvn',628,313.3,'paxuc')

statement ok
INSERT INTO tab0 VALUES(96,851,974.75,'ekheo',872,277.57,'bilhk')

statement ok
INSERT INTO tab0 VALUES(97,528,140.45,'cpmhi',466,166.93,'tfxxw')

statement ok
INSERT INTO tab0 VALUES(98,541,469.65,'dktvn',334,107.1,'eshon')

statement ok
INSERT INTO tab0 VALUES(99,795,156.3,'hengh',15,395.21,'ioatk')

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

statement ok
CREATE INDEX idx_tab1_0 on tab1 (col0)

statement ok
CREATE INDEX idx_tab1_1 on tab1 (col1)

statement ok
CREATE INDEX idx_tab1_3 on tab1 (col3)

statement ok
CREATE INDEX idx_tab1_4 on tab1 (col4)

statement ok
INSERT INTO tab1 SELECT * FROM tab0

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

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

statement ok
CREATE INDEX idx_tab2_1 ON tab2 (col4 DESC)

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

statement ok
INSERT INTO tab2 SELECT * FROM tab0

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

statement ok
CREATE INDEX idx_tab3_0 ON tab3 (col3 DESC,col4,col1 DESC)

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

statement ok
CREATE UNIQUE INDEX idx_tab3_2 ON tab3 (col3 DESC,col1 DESC)

statement ok
INSERT INTO tab3 SELECT * FROM tab0

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

statement ok
CREATE UNIQUE INDEX idx_tab4_0 ON tab4 (col4 DESC)

statement ok
CREATE INDEX idx_tab4_1 ON tab4 (col3 DESC)

statement ok
INSERT INTO tab4 SELECT * FROM tab0

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

query II rowsort label-all
SELECT pk, col0 FROM tab0
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_798 AS SELECT pk, col0 FROM tab0 WHERE (col0 = 888)

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

statement ok
CREATE VIEW view_3_tab0_798 AS SELECT pk FROM view_1_tab0_798

query II rowsort label-0-1
SELECT pk, col0 FROM tab0 WHERE (col0 = 888)
----

query II rowsort label-0-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 = 888))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab0_798
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 = 888) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 = 888))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_798 UNION ALL SELECT pk, col0 FROM view_2_tab0_798
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 = 888) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 = 888))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_798 UNION SELECT pk, col0 FROM view_2_tab0_798
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

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

query I rowsort label-0-3
SELECT pk FROM tab0 WHERE (col0 = 888)
----

statement ok
DROP VIEW view_1_tab0_798

statement ok
DROP VIEW view_2_tab0_798

statement ok
DROP VIEW view_3_tab0_798

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_798 AS SELECT pk, col0 FROM tab1 WHERE (col0 = 888)

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

statement ok
CREATE VIEW view_3_tab1_798 AS SELECT pk FROM view_1_tab1_798

query II rowsort label-0-1
SELECT pk, col0 FROM tab1 WHERE (col0 = 888)
----

query II rowsort label-0-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 = 888))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab1_798
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 = 888) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 = 888))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_798 UNION ALL SELECT pk, col0 FROM view_2_tab1_798
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 = 888) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 = 888))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_798 UNION SELECT pk, col0 FROM view_2_tab1_798
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

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

query I rowsort label-0-3
SELECT pk FROM tab1 WHERE (col0 = 888)
----

statement ok
DROP VIEW view_1_tab1_798

statement ok
DROP VIEW view_2_tab1_798

statement ok
DROP VIEW view_3_tab1_798

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_798 AS SELECT pk, col0 FROM tab2 WHERE (col0 = 888)

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

statement ok
CREATE VIEW view_3_tab2_798 AS SELECT pk FROM view_1_tab2_798

query II rowsort label-0-1
SELECT pk, col0 FROM tab2 WHERE (col0 = 888)
----

query II rowsort label-0-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 = 888))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab2_798
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 = 888) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 = 888))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_798 UNION ALL SELECT pk, col0 FROM view_2_tab2_798
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 = 888) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 = 888))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_798 UNION SELECT pk, col0 FROM view_2_tab2_798
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

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

query I rowsort label-0-3
SELECT pk FROM tab2 WHERE (col0 = 888)
----

statement ok
DROP VIEW view_1_tab2_798

statement ok
DROP VIEW view_2_tab2_798

statement ok
DROP VIEW view_3_tab2_798

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_798 AS SELECT pk, col0 FROM tab3 WHERE (col0 = 888)

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

statement ok
CREATE VIEW view_3_tab3_798 AS SELECT pk FROM view_1_tab3_798

query II rowsort label-0-1
SELECT pk, col0 FROM tab3 WHERE (col0 = 888)
----

query II rowsort label-0-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 = 888))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab3_798
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 = 888) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 = 888))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_798 UNION ALL SELECT pk, col0 FROM view_2_tab3_798
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 = 888) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 = 888))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_798 UNION SELECT pk, col0 FROM view_2_tab3_798
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

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

query I rowsort label-0-3
SELECT pk FROM tab3 WHERE (col0 = 888)
----

statement ok
DROP VIEW view_1_tab3_798

statement ok
DROP VIEW view_2_tab3_798

statement ok
DROP VIEW view_3_tab3_798

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_798 AS SELECT pk, col0 FROM tab4 WHERE (col0 = 888)

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

statement ok
CREATE VIEW view_3_tab4_798 AS SELECT pk FROM view_1_tab4_798

query II rowsort label-0-1
SELECT pk, col0 FROM tab4 WHERE (col0 = 888)
----

query II rowsort label-0-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 = 888))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab4_798
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 = 888) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 = 888))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_798 UNION ALL SELECT pk, col0 FROM view_2_tab4_798
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 = 888) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 = 888))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_798 UNION SELECT pk, col0 FROM view_2_tab4_798
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

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

query I rowsort label-0-3
SELECT pk FROM tab4 WHERE (col0 = 888)
----

statement ok
DROP VIEW view_1_tab4_798

statement ok
DROP VIEW view_2_tab4_798

statement ok
DROP VIEW view_3_tab4_798

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_799 AS SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38

statement ok
CREATE VIEW view_2_tab0_799 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)

statement ok
CREATE VIEW view_3_tab0_799 AS SELECT pk FROM view_1_tab0_799

query II rowsort label-100-1
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38
----
164 values hashing to 9b7bf4aa3c035c5da95aabe4ba561f57

query II rowsort label-100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)
----
36 values hashing to 2924eb40b732c308e4048f67f7d3d9ac

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab0_799
----
164 values hashing to 9b7bf4aa3c035c5da95aabe4ba561f57

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab0_799
----
36 values hashing to 2924eb40b732c308e4048f67f7d3d9ac

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_799 UNION ALL SELECT pk, col0 FROM view_2_tab0_799
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_799 UNION SELECT pk, col0 FROM view_2_tab0_799
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38 ) AS tab0_799
----
82 values hashing to 9970a5136345a5c90ecf1209a35af03a

query I rowsort label-100-3
SELECT * FROM view_3_tab0_799
----
82 values hashing to 9970a5136345a5c90ecf1209a35af03a

query I rowsort label-100-3
SELECT pk FROM tab0 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38
----
82 values hashing to 9970a5136345a5c90ecf1209a35af03a

statement ok
DROP VIEW view_1_tab0_799

statement ok
DROP VIEW view_2_tab0_799

statement ok
DROP VIEW view_3_tab0_799

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_799 AS SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38

statement ok
CREATE VIEW view_2_tab1_799 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)

statement ok
CREATE VIEW view_3_tab1_799 AS SELECT pk FROM view_1_tab1_799

query II rowsort label-100-1
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38
----
164 values hashing to 9b7bf4aa3c035c5da95aabe4ba561f57

query II rowsort label-100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)
----
36 values hashing to 2924eb40b732c308e4048f67f7d3d9ac

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab1_799
----
164 values hashing to 9b7bf4aa3c035c5da95aabe4ba561f57

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab1_799
----
36 values hashing to 2924eb40b732c308e4048f67f7d3d9ac

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_799 UNION ALL SELECT pk, col0 FROM view_2_tab1_799
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_799 UNION SELECT pk, col0 FROM view_2_tab1_799
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38 ) AS tab1_799
----
82 values hashing to 9970a5136345a5c90ecf1209a35af03a

query I rowsort label-100-3
SELECT * FROM view_3_tab1_799
----
82 values hashing to 9970a5136345a5c90ecf1209a35af03a

query I rowsort label-100-3
SELECT pk FROM tab1 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38
----
82 values hashing to 9970a5136345a5c90ecf1209a35af03a

statement ok
DROP VIEW view_1_tab1_799

statement ok
DROP VIEW view_2_tab1_799

statement ok
DROP VIEW view_3_tab1_799

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_799 AS SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38

statement ok
CREATE VIEW view_2_tab2_799 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)

statement ok
CREATE VIEW view_3_tab2_799 AS SELECT pk FROM view_1_tab2_799

query II rowsort label-100-1
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38
----
164 values hashing to 9b7bf4aa3c035c5da95aabe4ba561f57

query II rowsort label-100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)
----
36 values hashing to 2924eb40b732c308e4048f67f7d3d9ac

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab2_799
----
164 values hashing to 9b7bf4aa3c035c5da95aabe4ba561f57

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab2_799
----
36 values hashing to 2924eb40b732c308e4048f67f7d3d9ac

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_799 UNION ALL SELECT pk, col0 FROM view_2_tab2_799
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_799 UNION SELECT pk, col0 FROM view_2_tab2_799
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38 ) AS tab2_799
----
82 values hashing to 9970a5136345a5c90ecf1209a35af03a

query I rowsort label-100-3
SELECT * FROM view_3_tab2_799
----
82 values hashing to 9970a5136345a5c90ecf1209a35af03a

query I rowsort label-100-3
SELECT pk FROM tab2 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38
----
82 values hashing to 9970a5136345a5c90ecf1209a35af03a

statement ok
DROP VIEW view_1_tab2_799

statement ok
DROP VIEW view_2_tab2_799

statement ok
DROP VIEW view_3_tab2_799

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_799 AS SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38

statement ok
CREATE VIEW view_2_tab3_799 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)

statement ok
CREATE VIEW view_3_tab3_799 AS SELECT pk FROM view_1_tab3_799

query II rowsort label-100-1
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38
----
164 values hashing to 9b7bf4aa3c035c5da95aabe4ba561f57

query II rowsort label-100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)
----
36 values hashing to 2924eb40b732c308e4048f67f7d3d9ac

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab3_799
----
164 values hashing to 9b7bf4aa3c035c5da95aabe4ba561f57

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab3_799
----
36 values hashing to 2924eb40b732c308e4048f67f7d3d9ac

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_799 UNION ALL SELECT pk, col0 FROM view_2_tab3_799
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_799 UNION SELECT pk, col0 FROM view_2_tab3_799
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38 ) AS tab3_799
----
82 values hashing to 9970a5136345a5c90ecf1209a35af03a

query I rowsort label-100-3
SELECT * FROM view_3_tab3_799
----
82 values hashing to 9970a5136345a5c90ecf1209a35af03a

query I rowsort label-100-3
SELECT pk FROM tab3 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38
----
82 values hashing to 9970a5136345a5c90ecf1209a35af03a

statement ok
DROP VIEW view_1_tab3_799

statement ok
DROP VIEW view_2_tab3_799

statement ok
DROP VIEW view_3_tab3_799

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_799 AS SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38

statement ok
CREATE VIEW view_2_tab4_799 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)

statement ok
CREATE VIEW view_3_tab4_799 AS SELECT pk FROM view_1_tab4_799

query II rowsort label-100-1
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38
----
164 values hashing to 9b7bf4aa3c035c5da95aabe4ba561f57

query II rowsort label-100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)
----
36 values hashing to 2924eb40b732c308e4048f67f7d3d9ac

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab4_799
----
164 values hashing to 9b7bf4aa3c035c5da95aabe4ba561f57

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab4_799
----
36 values hashing to 2924eb40b732c308e4048f67f7d3d9ac

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_799 UNION ALL SELECT pk, col0 FROM view_2_tab4_799
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_799 UNION SELECT pk, col0 FROM view_2_tab4_799
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38 ) AS tab4_799
----
82 values hashing to 9970a5136345a5c90ecf1209a35af03a

query I rowsort label-100-3
SELECT * FROM view_3_tab4_799
----
82 values hashing to 9970a5136345a5c90ecf1209a35af03a

query I rowsort label-100-3
SELECT pk FROM tab4 WHERE col3 IS NULL OR (col3 >= 422 OR (col3 > 734 AND (col3 < 813 OR col1 BETWEEN 30.88 AND 73.78) OR col4 >= 799.72)) AND (col3 >= 948) AND ((col3 > 52)) OR (col0 > 298) OR col1 < 283.19 OR col4 = 879.38
----
82 values hashing to 9970a5136345a5c90ecf1209a35af03a

statement ok
DROP VIEW view_1_tab4_799

statement ok
DROP VIEW view_2_tab4_799

statement ok
DROP VIEW view_3_tab4_799

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_800 AS SELECT pk, col0 FROM tab0 WHERE col0 > 844

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

statement ok
CREATE VIEW view_3_tab0_800 AS SELECT pk FROM view_1_tab0_800

query II rowsort label-200-1
SELECT pk, col0 FROM tab0 WHERE col0 > 844
----
44 values hashing to 144da9d327abef5f2c11036e0b4e5b67

query II rowsort label-200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 844)
----
156 values hashing to 5a8166cce622c0ca94accf7ac19e1cf4

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab0_800
----
44 values hashing to 144da9d327abef5f2c11036e0b4e5b67

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab0_800
----
156 values hashing to 5a8166cce622c0ca94accf7ac19e1cf4

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 844 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 844)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_800 UNION ALL SELECT pk, col0 FROM view_2_tab0_800
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 844 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 844)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_800 UNION SELECT pk, col0 FROM view_2_tab0_800
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 844 ) AS tab0_800
----
22 values hashing to 96fe476686da148b25392d0260781739

query I rowsort label-200-3
SELECT * FROM view_3_tab0_800
----
22 values hashing to 96fe476686da148b25392d0260781739

query I rowsort label-200-3
SELECT pk FROM tab0 WHERE col0 > 844
----
22 values hashing to 96fe476686da148b25392d0260781739

statement ok
DROP VIEW view_1_tab0_800

statement ok
DROP VIEW view_2_tab0_800

statement ok
DROP VIEW view_3_tab0_800

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_800 AS SELECT pk, col0 FROM tab1 WHERE col0 > 844

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

statement ok
CREATE VIEW view_3_tab1_800 AS SELECT pk FROM view_1_tab1_800

query II rowsort label-200-1
SELECT pk, col0 FROM tab1 WHERE col0 > 844
----
44 values hashing to 144da9d327abef5f2c11036e0b4e5b67

query II rowsort label-200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 844)
----
156 values hashing to 5a8166cce622c0ca94accf7ac19e1cf4

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab1_800
----
44 values hashing to 144da9d327abef5f2c11036e0b4e5b67

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab1_800
----
156 values hashing to 5a8166cce622c0ca94accf7ac19e1cf4

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 844 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 844)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_800 UNION ALL SELECT pk, col0 FROM view_2_tab1_800
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 844 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 844)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_800 UNION SELECT pk, col0 FROM view_2_tab1_800
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 844 ) AS tab1_800
----
22 values hashing to 96fe476686da148b25392d0260781739

query I rowsort label-200-3
SELECT * FROM view_3_tab1_800
----
22 values hashing to 96fe476686da148b25392d0260781739

query I rowsort label-200-3
SELECT pk FROM tab1 WHERE col0 > 844
----
22 values hashing to 96fe476686da148b25392d0260781739

statement ok
DROP VIEW view_1_tab1_800

statement ok
DROP VIEW view_2_tab1_800

statement ok
DROP VIEW view_3_tab1_800

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_800 AS SELECT pk, col0 FROM tab2 WHERE col0 > 844

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

statement ok
CREATE VIEW view_3_tab2_800 AS SELECT pk FROM view_1_tab2_800

query II rowsort label-200-1
SELECT pk, col0 FROM tab2 WHERE col0 > 844
----
44 values hashing to 144da9d327abef5f2c11036e0b4e5b67

query II rowsort label-200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 844)
----
156 values hashing to 5a8166cce622c0ca94accf7ac19e1cf4

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab2_800
----
44 values hashing to 144da9d327abef5f2c11036e0b4e5b67

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab2_800
----
156 values hashing to 5a8166cce622c0ca94accf7ac19e1cf4

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 844 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 844)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_800 UNION ALL SELECT pk, col0 FROM view_2_tab2_800
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 844 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 844)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_800 UNION SELECT pk, col0 FROM view_2_tab2_800
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 844 ) AS tab2_800
----
22 values hashing to 96fe476686da148b25392d0260781739

query I rowsort label-200-3
SELECT * FROM view_3_tab2_800
----
22 values hashing to 96fe476686da148b25392d0260781739

query I rowsort label-200-3
SELECT pk FROM tab2 WHERE col0 > 844
----
22 values hashing to 96fe476686da148b25392d0260781739

statement ok
DROP VIEW view_1_tab2_800

statement ok
DROP VIEW view_2_tab2_800

statement ok
DROP VIEW view_3_tab2_800

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_800 AS SELECT pk, col0 FROM tab3 WHERE col0 > 844

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

statement ok
CREATE VIEW view_3_tab3_800 AS SELECT pk FROM view_1_tab3_800

query II rowsort label-200-1
SELECT pk, col0 FROM tab3 WHERE col0 > 844
----
44 values hashing to 144da9d327abef5f2c11036e0b4e5b67

query II rowsort label-200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 844)
----
156 values hashing to 5a8166cce622c0ca94accf7ac19e1cf4

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab3_800
----
44 values hashing to 144da9d327abef5f2c11036e0b4e5b67

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab3_800
----
156 values hashing to 5a8166cce622c0ca94accf7ac19e1cf4

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 844 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 844)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_800 UNION ALL SELECT pk, col0 FROM view_2_tab3_800
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 844 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 844)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_800 UNION SELECT pk, col0 FROM view_2_tab3_800
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 844 ) AS tab3_800
----
22 values hashing to 96fe476686da148b25392d0260781739

query I rowsort label-200-3
SELECT * FROM view_3_tab3_800
----
22 values hashing to 96fe476686da148b25392d0260781739

query I rowsort label-200-3
SELECT pk FROM tab3 WHERE col0 > 844
----
22 values hashing to 96fe476686da148b25392d0260781739

statement ok
DROP VIEW view_1_tab3_800

statement ok
DROP VIEW view_2_tab3_800

statement ok
DROP VIEW view_3_tab3_800

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_800 AS SELECT pk, col0 FROM tab4 WHERE col0 > 844

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

statement ok
CREATE VIEW view_3_tab4_800 AS SELECT pk FROM view_1_tab4_800

query II rowsort label-200-1
SELECT pk, col0 FROM tab4 WHERE col0 > 844
----
44 values hashing to 144da9d327abef5f2c11036e0b4e5b67

query II rowsort label-200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 844)
----
156 values hashing to 5a8166cce622c0ca94accf7ac19e1cf4

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab4_800
----
44 values hashing to 144da9d327abef5f2c11036e0b4e5b67

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab4_800
----
156 values hashing to 5a8166cce622c0ca94accf7ac19e1cf4

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 844 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 844)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_800 UNION ALL SELECT pk, col0 FROM view_2_tab4_800
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 844 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 844)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_800 UNION SELECT pk, col0 FROM view_2_tab4_800
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 844 ) AS tab4_800
----
22 values hashing to 96fe476686da148b25392d0260781739

query I rowsort label-200-3
SELECT * FROM view_3_tab4_800
----
22 values hashing to 96fe476686da148b25392d0260781739

query I rowsort label-200-3
SELECT pk FROM tab4 WHERE col0 > 844
----
22 values hashing to 96fe476686da148b25392d0260781739

statement ok
DROP VIEW view_1_tab4_800

statement ok
DROP VIEW view_2_tab4_800

statement ok
DROP VIEW view_3_tab4_800

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_801 AS SELECT pk, col0 FROM tab0 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836))

statement ok
CREATE VIEW view_2_tab0_801 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))

statement ok
CREATE VIEW view_3_tab0_801 AS SELECT pk FROM view_1_tab0_801

query II rowsort label-300-1
SELECT pk, col0 FROM tab0 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836))
----
100 values hashing to 3e142a73a7e89b07f43aefb9c2ab6d52

query II rowsort label-300-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))
----
100 values hashing to 4cad19a0a8d3c6b15895460be5fa445c

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab0_801
----
100 values hashing to 3e142a73a7e89b07f43aefb9c2ab6d52

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab0_801
----
100 values hashing to 4cad19a0a8d3c6b15895460be5fa445c

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_801 UNION ALL SELECT pk, col0 FROM view_2_tab0_801
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_801 UNION SELECT pk, col0 FROM view_2_tab0_801
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)) ) AS tab0_801
----
50 values hashing to fa9c48c9e9bbf736e6c36f41b507c573

query I rowsort label-300-3
SELECT * FROM view_3_tab0_801
----
50 values hashing to fa9c48c9e9bbf736e6c36f41b507c573

query I rowsort label-300-3
SELECT pk FROM tab0 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836))
----
50 values hashing to fa9c48c9e9bbf736e6c36f41b507c573

statement ok
DROP VIEW view_1_tab0_801

statement ok
DROP VIEW view_2_tab0_801

statement ok
DROP VIEW view_3_tab0_801

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_801 AS SELECT pk, col0 FROM tab1 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836))

statement ok
CREATE VIEW view_2_tab1_801 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))

statement ok
CREATE VIEW view_3_tab1_801 AS SELECT pk FROM view_1_tab1_801

query II rowsort label-300-1
SELECT pk, col0 FROM tab1 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836))
----
100 values hashing to 3e142a73a7e89b07f43aefb9c2ab6d52

query II rowsort label-300-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))
----
100 values hashing to 4cad19a0a8d3c6b15895460be5fa445c

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab1_801
----
100 values hashing to 3e142a73a7e89b07f43aefb9c2ab6d52

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab1_801
----
100 values hashing to 4cad19a0a8d3c6b15895460be5fa445c

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_801 UNION ALL SELECT pk, col0 FROM view_2_tab1_801
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_801 UNION SELECT pk, col0 FROM view_2_tab1_801
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)) ) AS tab1_801
----
50 values hashing to fa9c48c9e9bbf736e6c36f41b507c573

query I rowsort label-300-3
SELECT * FROM view_3_tab1_801
----
50 values hashing to fa9c48c9e9bbf736e6c36f41b507c573

query I rowsort label-300-3
SELECT pk FROM tab1 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836))
----
50 values hashing to fa9c48c9e9bbf736e6c36f41b507c573

statement ok
DROP VIEW view_1_tab1_801

statement ok
DROP VIEW view_2_tab1_801

statement ok
DROP VIEW view_3_tab1_801

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_801 AS SELECT pk, col0 FROM tab2 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836))

statement ok
CREATE VIEW view_2_tab2_801 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))

statement ok
CREATE VIEW view_3_tab2_801 AS SELECT pk FROM view_1_tab2_801

query II rowsort label-300-1
SELECT pk, col0 FROM tab2 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836))
----
100 values hashing to 3e142a73a7e89b07f43aefb9c2ab6d52

query II rowsort label-300-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))
----
100 values hashing to 4cad19a0a8d3c6b15895460be5fa445c

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab2_801
----
100 values hashing to 3e142a73a7e89b07f43aefb9c2ab6d52

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab2_801
----
100 values hashing to 4cad19a0a8d3c6b15895460be5fa445c

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_801 UNION ALL SELECT pk, col0 FROM view_2_tab2_801
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_801 UNION SELECT pk, col0 FROM view_2_tab2_801
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)) ) AS tab2_801
----
50 values hashing to fa9c48c9e9bbf736e6c36f41b507c573

query I rowsort label-300-3
SELECT * FROM view_3_tab2_801
----
50 values hashing to fa9c48c9e9bbf736e6c36f41b507c573

query I rowsort label-300-3
SELECT pk FROM tab2 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836))
----
50 values hashing to fa9c48c9e9bbf736e6c36f41b507c573

statement ok
DROP VIEW view_1_tab2_801

statement ok
DROP VIEW view_2_tab2_801

statement ok
DROP VIEW view_3_tab2_801

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_801 AS SELECT pk, col0 FROM tab3 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836))

statement ok
CREATE VIEW view_2_tab3_801 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))

statement ok
CREATE VIEW view_3_tab3_801 AS SELECT pk FROM view_1_tab3_801

query II rowsort label-300-1
SELECT pk, col0 FROM tab3 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836))
----
100 values hashing to 3e142a73a7e89b07f43aefb9c2ab6d52

query II rowsort label-300-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))
----
100 values hashing to 4cad19a0a8d3c6b15895460be5fa445c

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab3_801
----
100 values hashing to 3e142a73a7e89b07f43aefb9c2ab6d52

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab3_801
----
100 values hashing to 4cad19a0a8d3c6b15895460be5fa445c

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_801 UNION ALL SELECT pk, col0 FROM view_2_tab3_801
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_801 UNION SELECT pk, col0 FROM view_2_tab3_801
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)) ) AS tab3_801
----
50 values hashing to fa9c48c9e9bbf736e6c36f41b507c573

query I rowsort label-300-3
SELECT * FROM view_3_tab3_801
----
50 values hashing to fa9c48c9e9bbf736e6c36f41b507c573

query I rowsort label-300-3
SELECT pk FROM tab3 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836))
----
50 values hashing to fa9c48c9e9bbf736e6c36f41b507c573

statement ok
DROP VIEW view_1_tab3_801

statement ok
DROP VIEW view_2_tab3_801

statement ok
DROP VIEW view_3_tab3_801

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_801 AS SELECT pk, col0 FROM tab4 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836))

statement ok
CREATE VIEW view_2_tab4_801 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))

statement ok
CREATE VIEW view_3_tab4_801 AS SELECT pk FROM view_1_tab4_801

query II rowsort label-300-1
SELECT pk, col0 FROM tab4 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836))
----
100 values hashing to 3e142a73a7e89b07f43aefb9c2ab6d52

query II rowsort label-300-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))
----
100 values hashing to 4cad19a0a8d3c6b15895460be5fa445c

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab4_801
----
100 values hashing to 3e142a73a7e89b07f43aefb9c2ab6d52

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab4_801
----
100 values hashing to 4cad19a0a8d3c6b15895460be5fa445c

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_801 UNION ALL SELECT pk, col0 FROM view_2_tab4_801
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_801 UNION SELECT pk, col0 FROM view_2_tab4_801
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836)) ) AS tab4_801
----
50 values hashing to fa9c48c9e9bbf736e6c36f41b507c573

query I rowsort label-300-3
SELECT * FROM view_3_tab4_801
----
50 values hashing to fa9c48c9e9bbf736e6c36f41b507c573

query I rowsort label-300-3
SELECT pk FROM tab4 WHERE ((col4 >= 485.68 OR col1 <= 935.75 AND col0 = 836))
----
50 values hashing to fa9c48c9e9bbf736e6c36f41b507c573

statement ok
DROP VIEW view_1_tab4_801

statement ok
DROP VIEW view_2_tab4_801

statement ok
DROP VIEW view_3_tab4_801

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_802 AS SELECT pk, col0 FROM tab0 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL))))

statement ok
CREATE VIEW view_2_tab0_802 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))

statement ok
CREATE VIEW view_3_tab0_802 AS SELECT pk FROM view_1_tab0_802

query II rowsort label-400-1
SELECT pk, col0 FROM tab0 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL))))
----
112 values hashing to fc61804c21b48c4b42042c2393ee087a

query II rowsort label-400-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))
----
88 values hashing to 1e6c384336ff6ae9466ba34a867d981a

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab0_802
----
112 values hashing to fc61804c21b48c4b42042c2393ee087a

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab0_802
----
88 values hashing to 1e6c384336ff6ae9466ba34a867d981a

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_802 UNION ALL SELECT pk, col0 FROM view_2_tab0_802
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_802 UNION SELECT pk, col0 FROM view_2_tab0_802
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))) ) AS tab0_802
----
56 values hashing to 9c7f84a4ba735af34bdfb30201d6bf09

query I rowsort label-400-3
SELECT * FROM view_3_tab0_802
----
56 values hashing to 9c7f84a4ba735af34bdfb30201d6bf09

query I rowsort label-400-3
SELECT pk FROM tab0 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL))))
----
56 values hashing to 9c7f84a4ba735af34bdfb30201d6bf09

statement ok
DROP VIEW view_1_tab0_802

statement ok
DROP VIEW view_2_tab0_802

statement ok
DROP VIEW view_3_tab0_802

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_802 AS SELECT pk, col0 FROM tab1 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL))))

statement ok
CREATE VIEW view_2_tab1_802 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))

statement ok
CREATE VIEW view_3_tab1_802 AS SELECT pk FROM view_1_tab1_802

query II rowsort label-400-1
SELECT pk, col0 FROM tab1 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL))))
----
112 values hashing to fc61804c21b48c4b42042c2393ee087a

query II rowsort label-400-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))
----
88 values hashing to 1e6c384336ff6ae9466ba34a867d981a

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab1_802
----
112 values hashing to fc61804c21b48c4b42042c2393ee087a

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab1_802
----
88 values hashing to 1e6c384336ff6ae9466ba34a867d981a

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_802 UNION ALL SELECT pk, col0 FROM view_2_tab1_802
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_802 UNION SELECT pk, col0 FROM view_2_tab1_802
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))) ) AS tab1_802
----
56 values hashing to 9c7f84a4ba735af34bdfb30201d6bf09

query I rowsort label-400-3
SELECT * FROM view_3_tab1_802
----
56 values hashing to 9c7f84a4ba735af34bdfb30201d6bf09

query I rowsort label-400-3
SELECT pk FROM tab1 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL))))
----
56 values hashing to 9c7f84a4ba735af34bdfb30201d6bf09

statement ok
DROP VIEW view_1_tab1_802

statement ok
DROP VIEW view_2_tab1_802

statement ok
DROP VIEW view_3_tab1_802

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_802 AS SELECT pk, col0 FROM tab2 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL))))

statement ok
CREATE VIEW view_2_tab2_802 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))

statement ok
CREATE VIEW view_3_tab2_802 AS SELECT pk FROM view_1_tab2_802

query II rowsort label-400-1
SELECT pk, col0 FROM tab2 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL))))
----
112 values hashing to fc61804c21b48c4b42042c2393ee087a

query II rowsort label-400-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))
----
88 values hashing to 1e6c384336ff6ae9466ba34a867d981a

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab2_802
----
112 values hashing to fc61804c21b48c4b42042c2393ee087a

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab2_802
----
88 values hashing to 1e6c384336ff6ae9466ba34a867d981a

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_802 UNION ALL SELECT pk, col0 FROM view_2_tab2_802
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_802 UNION SELECT pk, col0 FROM view_2_tab2_802
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))) ) AS tab2_802
----
56 values hashing to 9c7f84a4ba735af34bdfb30201d6bf09

query I rowsort label-400-3
SELECT * FROM view_3_tab2_802
----
56 values hashing to 9c7f84a4ba735af34bdfb30201d6bf09

query I rowsort label-400-3
SELECT pk FROM tab2 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL))))
----
56 values hashing to 9c7f84a4ba735af34bdfb30201d6bf09

statement ok
DROP VIEW view_1_tab2_802

statement ok
DROP VIEW view_2_tab2_802

statement ok
DROP VIEW view_3_tab2_802

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_802 AS SELECT pk, col0 FROM tab3 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL))))

statement ok
CREATE VIEW view_2_tab3_802 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))

statement ok
CREATE VIEW view_3_tab3_802 AS SELECT pk FROM view_1_tab3_802

query II rowsort label-400-1
SELECT pk, col0 FROM tab3 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL))))
----
112 values hashing to fc61804c21b48c4b42042c2393ee087a

query II rowsort label-400-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))
----
88 values hashing to 1e6c384336ff6ae9466ba34a867d981a

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab3_802
----
112 values hashing to fc61804c21b48c4b42042c2393ee087a

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab3_802
----
88 values hashing to 1e6c384336ff6ae9466ba34a867d981a

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_802 UNION ALL SELECT pk, col0 FROM view_2_tab3_802
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_802 UNION SELECT pk, col0 FROM view_2_tab3_802
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))) ) AS tab3_802
----
56 values hashing to 9c7f84a4ba735af34bdfb30201d6bf09

query I rowsort label-400-3
SELECT * FROM view_3_tab3_802
----
56 values hashing to 9c7f84a4ba735af34bdfb30201d6bf09

query I rowsort label-400-3
SELECT pk FROM tab3 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL))))
----
56 values hashing to 9c7f84a4ba735af34bdfb30201d6bf09

statement ok
DROP VIEW view_1_tab3_802

statement ok
DROP VIEW view_2_tab3_802

statement ok
DROP VIEW view_3_tab3_802

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_802 AS SELECT pk, col0 FROM tab4 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL))))

statement ok
CREATE VIEW view_2_tab4_802 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))

statement ok
CREATE VIEW view_3_tab4_802 AS SELECT pk FROM view_1_tab4_802

query II rowsort label-400-1
SELECT pk, col0 FROM tab4 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL))))
----
112 values hashing to fc61804c21b48c4b42042c2393ee087a

query II rowsort label-400-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))
----
88 values hashing to 1e6c384336ff6ae9466ba34a867d981a

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab4_802
----
112 values hashing to fc61804c21b48c4b42042c2393ee087a

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab4_802
----
88 values hashing to 1e6c384336ff6ae9466ba34a867d981a

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_802 UNION ALL SELECT pk, col0 FROM view_2_tab4_802
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_802 UNION SELECT pk, col0 FROM view_2_tab4_802
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL)))) ) AS tab4_802
----
56 values hashing to 9c7f84a4ba735af34bdfb30201d6bf09

query I rowsort label-400-3
SELECT * FROM view_3_tab4_802
----
56 values hashing to 9c7f84a4ba735af34bdfb30201d6bf09

query I rowsort label-400-3
SELECT pk FROM tab4 WHERE (col4 < 468.15 AND col3 > 163 OR (col0 = 676) AND col0 <= 844 AND col0 IS NULL AND col0 < 440 AND col3 < 620 OR col1 < 307.93 AND (((col1 <= 561.20) AND ((col1 < 278.99)) OR (col1 IS NULL))))
----
56 values hashing to 9c7f84a4ba735af34bdfb30201d6bf09

statement ok
DROP VIEW view_1_tab4_802

statement ok
DROP VIEW view_2_tab4_802

statement ok
DROP VIEW view_3_tab4_802

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_803 AS SELECT pk, col0 FROM tab0 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab0_803 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab0_803 AS SELECT pk FROM view_1_tab0_803

query II rowsort label-500-1
SELECT pk, col0 FROM tab0 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL
----

query II rowsort label-500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab0_803
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_803 UNION ALL SELECT pk, col0 FROM view_2_tab0_803
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_803 UNION SELECT pk, col0 FROM view_2_tab0_803
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL ) AS tab0_803
----

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

query I rowsort label-500-3
SELECT pk FROM tab0 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL
----

statement ok
DROP VIEW view_1_tab0_803

statement ok
DROP VIEW view_2_tab0_803

statement ok
DROP VIEW view_3_tab0_803

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_803 AS SELECT pk, col0 FROM tab1 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab1_803 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab1_803 AS SELECT pk FROM view_1_tab1_803

query II rowsort label-500-1
SELECT pk, col0 FROM tab1 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL
----

query II rowsort label-500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab1_803
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_803 UNION ALL SELECT pk, col0 FROM view_2_tab1_803
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_803 UNION SELECT pk, col0 FROM view_2_tab1_803
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL ) AS tab1_803
----

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

query I rowsort label-500-3
SELECT pk FROM tab1 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL
----

statement ok
DROP VIEW view_1_tab1_803

statement ok
DROP VIEW view_2_tab1_803

statement ok
DROP VIEW view_3_tab1_803

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_803 AS SELECT pk, col0 FROM tab2 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab2_803 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab2_803 AS SELECT pk FROM view_1_tab2_803

query II rowsort label-500-1
SELECT pk, col0 FROM tab2 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL
----

query II rowsort label-500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab2_803
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_803 UNION ALL SELECT pk, col0 FROM view_2_tab2_803
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_803 UNION SELECT pk, col0 FROM view_2_tab2_803
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL ) AS tab2_803
----

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

query I rowsort label-500-3
SELECT pk FROM tab2 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL
----

statement ok
DROP VIEW view_1_tab2_803

statement ok
DROP VIEW view_2_tab2_803

statement ok
DROP VIEW view_3_tab2_803

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_803 AS SELECT pk, col0 FROM tab3 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab3_803 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab3_803 AS SELECT pk FROM view_1_tab3_803

query II rowsort label-500-1
SELECT pk, col0 FROM tab3 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL
----

query II rowsort label-500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab3_803
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_803 UNION ALL SELECT pk, col0 FROM view_2_tab3_803
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_803 UNION SELECT pk, col0 FROM view_2_tab3_803
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL ) AS tab3_803
----

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

query I rowsort label-500-3
SELECT pk FROM tab3 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL
----

statement ok
DROP VIEW view_1_tab3_803

statement ok
DROP VIEW view_2_tab3_803

statement ok
DROP VIEW view_3_tab3_803

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_803 AS SELECT pk, col0 FROM tab4 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab4_803 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab4_803 AS SELECT pk FROM view_1_tab4_803

query II rowsort label-500-1
SELECT pk, col0 FROM tab4 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL
----

query II rowsort label-500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

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

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab4_803
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_803 UNION ALL SELECT pk, col0 FROM view_2_tab4_803
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 307 AND col0 > 413 OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_803 UNION SELECT pk, col0 FROM view_2_tab4_803
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL ) AS tab4_803
----

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

query I rowsort label-500-3
SELECT pk FROM tab4 WHERE col0 = 307 AND col0 > 413 OR col3 IS NULL
----

statement ok
DROP VIEW view_1_tab4_803

statement ok
DROP VIEW view_2_tab4_803

statement ok
DROP VIEW view_3_tab4_803

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_804 AS SELECT pk, col0 FROM tab0 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615

statement ok
CREATE VIEW view_2_tab0_804 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)

statement ok
CREATE VIEW view_3_tab0_804 AS SELECT pk FROM view_1_tab0_804

query II rowsort label-600-1
SELECT pk, col0 FROM tab0 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615
----
11
576
47
71

query II rowsort label-600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)
----
196 values hashing to b72d65fb8cd36ab63e36d316a75e2502

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab0_804
----
11
576
47
71

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab0_804
----
196 values hashing to b72d65fb8cd36ab63e36d316a75e2502

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_804 UNION ALL SELECT pk, col0 FROM view_2_tab0_804
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_804 UNION SELECT pk, col0 FROM view_2_tab0_804
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615 ) AS tab0_804
----
11
47

query I rowsort label-600-3
SELECT * FROM view_3_tab0_804
----
11
47

query I rowsort label-600-3
SELECT pk FROM tab0 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615
----
11
47

statement ok
DROP VIEW view_1_tab0_804

statement ok
DROP VIEW view_2_tab0_804

statement ok
DROP VIEW view_3_tab0_804

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_804 AS SELECT pk, col0 FROM tab1 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615

statement ok
CREATE VIEW view_2_tab1_804 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)

statement ok
CREATE VIEW view_3_tab1_804 AS SELECT pk FROM view_1_tab1_804

query II rowsort label-600-1
SELECT pk, col0 FROM tab1 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615
----
11
576
47
71

query II rowsort label-600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)
----
196 values hashing to b72d65fb8cd36ab63e36d316a75e2502

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab1_804
----
11
576
47
71

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab1_804
----
196 values hashing to b72d65fb8cd36ab63e36d316a75e2502

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_804 UNION ALL SELECT pk, col0 FROM view_2_tab1_804
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_804 UNION SELECT pk, col0 FROM view_2_tab1_804
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615 ) AS tab1_804
----
11
47

query I rowsort label-600-3
SELECT * FROM view_3_tab1_804
----
11
47

query I rowsort label-600-3
SELECT pk FROM tab1 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615
----
11
47

statement ok
DROP VIEW view_1_tab1_804

statement ok
DROP VIEW view_2_tab1_804

statement ok
DROP VIEW view_3_tab1_804

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_804 AS SELECT pk, col0 FROM tab2 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615

statement ok
CREATE VIEW view_2_tab2_804 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)

statement ok
CREATE VIEW view_3_tab2_804 AS SELECT pk FROM view_1_tab2_804

query II rowsort label-600-1
SELECT pk, col0 FROM tab2 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615
----
11
576
47
71

query II rowsort label-600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)
----
196 values hashing to b72d65fb8cd36ab63e36d316a75e2502

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab2_804
----
11
576
47
71

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab2_804
----
196 values hashing to b72d65fb8cd36ab63e36d316a75e2502

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_804 UNION ALL SELECT pk, col0 FROM view_2_tab2_804
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_804 UNION SELECT pk, col0 FROM view_2_tab2_804
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615 ) AS tab2_804
----
11
47

query I rowsort label-600-3
SELECT * FROM view_3_tab2_804
----
11
47

query I rowsort label-600-3
SELECT pk FROM tab2 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615
----
11
47

statement ok
DROP VIEW view_1_tab2_804

statement ok
DROP VIEW view_2_tab2_804

statement ok
DROP VIEW view_3_tab2_804

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_804 AS SELECT pk, col0 FROM tab3 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615

statement ok
CREATE VIEW view_2_tab3_804 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)

statement ok
CREATE VIEW view_3_tab3_804 AS SELECT pk FROM view_1_tab3_804

query II rowsort label-600-1
SELECT pk, col0 FROM tab3 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615
----
11
576
47
71

query II rowsort label-600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)
----
196 values hashing to b72d65fb8cd36ab63e36d316a75e2502

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab3_804
----
11
576
47
71

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab3_804
----
196 values hashing to b72d65fb8cd36ab63e36d316a75e2502

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_804 UNION ALL SELECT pk, col0 FROM view_2_tab3_804
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_804 UNION SELECT pk, col0 FROM view_2_tab3_804
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615 ) AS tab3_804
----
11
47

query I rowsort label-600-3
SELECT * FROM view_3_tab3_804
----
11
47

query I rowsort label-600-3
SELECT pk FROM tab3 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615
----
11
47

statement ok
DROP VIEW view_1_tab3_804

statement ok
DROP VIEW view_2_tab3_804

statement ok
DROP VIEW view_3_tab3_804

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_804 AS SELECT pk, col0 FROM tab4 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615

statement ok
CREATE VIEW view_2_tab4_804 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)

statement ok
CREATE VIEW view_3_tab4_804 AS SELECT pk FROM view_1_tab4_804

query II rowsort label-600-1
SELECT pk, col0 FROM tab4 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615
----
11
576
47
71

query II rowsort label-600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)
----
196 values hashing to b72d65fb8cd36ab63e36d316a75e2502

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab4_804
----
11
576
47
71

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab4_804
----
196 values hashing to b72d65fb8cd36ab63e36d316a75e2502

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_804 UNION ALL SELECT pk, col0 FROM view_2_tab4_804
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_804 UNION SELECT pk, col0 FROM view_2_tab4_804
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615 ) AS tab4_804
----
11
47

query I rowsort label-600-3
SELECT * FROM view_3_tab4_804
----
11
47

query I rowsort label-600-3
SELECT pk FROM tab4 WHERE col4 > 627.65 AND col3 < 323 AND ((col1 <= 267.93)) AND col0 <= 615
----
11
47

statement ok
DROP VIEW view_1_tab4_804

statement ok
DROP VIEW view_2_tab4_804

statement ok
DROP VIEW view_3_tab4_804

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_805 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 454

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

statement ok
CREATE VIEW view_3_tab0_805 AS SELECT pk FROM view_1_tab0_805

query II rowsort label-700-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 454
----
124 values hashing to d3b432e4b6458b27fc91c67186136796

query II rowsort label-700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 454)
----
76 values hashing to 9960545803e51bb16a4e1232993b073b

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab0_805
----
124 values hashing to d3b432e4b6458b27fc91c67186136796

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab0_805
----
76 values hashing to 9960545803e51bb16a4e1232993b073b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 454 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 454)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_805 UNION ALL SELECT pk, col0 FROM view_2_tab0_805
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 454 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 454)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_805 UNION SELECT pk, col0 FROM view_2_tab0_805
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 454 ) AS tab0_805
----
62 values hashing to fc4c22afadb1a3ea4ba5c17164de8b68

query I rowsort label-700-3
SELECT * FROM view_3_tab0_805
----
62 values hashing to fc4c22afadb1a3ea4ba5c17164de8b68

query I rowsort label-700-3
SELECT pk FROM tab0 WHERE col3 >= 454
----
62 values hashing to fc4c22afadb1a3ea4ba5c17164de8b68

statement ok
DROP VIEW view_1_tab0_805

statement ok
DROP VIEW view_2_tab0_805

statement ok
DROP VIEW view_3_tab0_805

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_805 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 454

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

statement ok
CREATE VIEW view_3_tab1_805 AS SELECT pk FROM view_1_tab1_805

query II rowsort label-700-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 454
----
124 values hashing to d3b432e4b6458b27fc91c67186136796

query II rowsort label-700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 454)
----
76 values hashing to 9960545803e51bb16a4e1232993b073b

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab1_805
----
124 values hashing to d3b432e4b6458b27fc91c67186136796

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab1_805
----
76 values hashing to 9960545803e51bb16a4e1232993b073b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 454 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 454)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_805 UNION ALL SELECT pk, col0 FROM view_2_tab1_805
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 454 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 454)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_805 UNION SELECT pk, col0 FROM view_2_tab1_805
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 454 ) AS tab1_805
----
62 values hashing to fc4c22afadb1a3ea4ba5c17164de8b68

query I rowsort label-700-3
SELECT * FROM view_3_tab1_805
----
62 values hashing to fc4c22afadb1a3ea4ba5c17164de8b68

query I rowsort label-700-3
SELECT pk FROM tab1 WHERE col3 >= 454
----
62 values hashing to fc4c22afadb1a3ea4ba5c17164de8b68

statement ok
DROP VIEW view_1_tab1_805

statement ok
DROP VIEW view_2_tab1_805

statement ok
DROP VIEW view_3_tab1_805

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_805 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 454

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

statement ok
CREATE VIEW view_3_tab2_805 AS SELECT pk FROM view_1_tab2_805

query II rowsort label-700-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 454
----
124 values hashing to d3b432e4b6458b27fc91c67186136796

query II rowsort label-700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 454)
----
76 values hashing to 9960545803e51bb16a4e1232993b073b

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab2_805
----
124 values hashing to d3b432e4b6458b27fc91c67186136796

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab2_805
----
76 values hashing to 9960545803e51bb16a4e1232993b073b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 454 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 454)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_805 UNION ALL SELECT pk, col0 FROM view_2_tab2_805
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 454 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 454)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_805 UNION SELECT pk, col0 FROM view_2_tab2_805
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 454 ) AS tab2_805
----
62 values hashing to fc4c22afadb1a3ea4ba5c17164de8b68

query I rowsort label-700-3
SELECT * FROM view_3_tab2_805
----
62 values hashing to fc4c22afadb1a3ea4ba5c17164de8b68

query I rowsort label-700-3
SELECT pk FROM tab2 WHERE col3 >= 454
----
62 values hashing to fc4c22afadb1a3ea4ba5c17164de8b68

statement ok
DROP VIEW view_1_tab2_805

statement ok
DROP VIEW view_2_tab2_805

statement ok
DROP VIEW view_3_tab2_805

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_805 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 454

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

statement ok
CREATE VIEW view_3_tab3_805 AS SELECT pk FROM view_1_tab3_805

query II rowsort label-700-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 454
----
124 values hashing to d3b432e4b6458b27fc91c67186136796

query II rowsort label-700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 454)
----
76 values hashing to 9960545803e51bb16a4e1232993b073b

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab3_805
----
124 values hashing to d3b432e4b6458b27fc91c67186136796

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab3_805
----
76 values hashing to 9960545803e51bb16a4e1232993b073b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 454 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 454)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_805 UNION ALL SELECT pk, col0 FROM view_2_tab3_805
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 454 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 454)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_805 UNION SELECT pk, col0 FROM view_2_tab3_805
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 454 ) AS tab3_805
----
62 values hashing to fc4c22afadb1a3ea4ba5c17164de8b68

query I rowsort label-700-3
SELECT * FROM view_3_tab3_805
----
62 values hashing to fc4c22afadb1a3ea4ba5c17164de8b68

query I rowsort label-700-3
SELECT pk FROM tab3 WHERE col3 >= 454
----
62 values hashing to fc4c22afadb1a3ea4ba5c17164de8b68

statement ok
DROP VIEW view_1_tab3_805

statement ok
DROP VIEW view_2_tab3_805

statement ok
DROP VIEW view_3_tab3_805

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_805 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 454

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

statement ok
CREATE VIEW view_3_tab4_805 AS SELECT pk FROM view_1_tab4_805

query II rowsort label-700-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 454
----
124 values hashing to d3b432e4b6458b27fc91c67186136796

query II rowsort label-700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 454)
----
76 values hashing to 9960545803e51bb16a4e1232993b073b

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab4_805
----
124 values hashing to d3b432e4b6458b27fc91c67186136796

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab4_805
----
76 values hashing to 9960545803e51bb16a4e1232993b073b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 454 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 454)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_805 UNION ALL SELECT pk, col0 FROM view_2_tab4_805
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 454 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 454)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_805 UNION SELECT pk, col0 FROM view_2_tab4_805
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 454 ) AS tab4_805
----
62 values hashing to fc4c22afadb1a3ea4ba5c17164de8b68

query I rowsort label-700-3
SELECT * FROM view_3_tab4_805
----
62 values hashing to fc4c22afadb1a3ea4ba5c17164de8b68

query I rowsort label-700-3
SELECT pk FROM tab4 WHERE col3 >= 454
----
62 values hashing to fc4c22afadb1a3ea4ba5c17164de8b68

statement ok
DROP VIEW view_1_tab4_805

statement ok
DROP VIEW view_2_tab4_805

statement ok
DROP VIEW view_3_tab4_805

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab0_806 AS SELECT pk FROM view_1_tab0_806

query II rowsort label-800-1
SELECT pk, col0 FROM tab0 WHERE ((col0 >= 9))
----
198 values hashing to ba091ba410d1bb993688fbc2933893a1

query II rowsort label-800-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 >= 9)))
----
9
1

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab0_806
----
198 values hashing to ba091ba410d1bb993688fbc2933893a1

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab0_806
----
9
1

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 >= 9)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 >= 9)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_806 UNION ALL SELECT pk, col0 FROM view_2_tab0_806
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 >= 9)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 >= 9)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_806 UNION SELECT pk, col0 FROM view_2_tab0_806
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 >= 9)) ) AS tab0_806
----
99 values hashing to bac6cf5ee2072074c6851542bb2a5c96

query I rowsort label-800-3
SELECT * FROM view_3_tab0_806
----
99 values hashing to bac6cf5ee2072074c6851542bb2a5c96

query I rowsort label-800-3
SELECT pk FROM tab0 WHERE ((col0 >= 9))
----
99 values hashing to bac6cf5ee2072074c6851542bb2a5c96

statement ok
DROP VIEW view_1_tab0_806

statement ok
DROP VIEW view_2_tab0_806

statement ok
DROP VIEW view_3_tab0_806

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab1_806 AS SELECT pk FROM view_1_tab1_806

query II rowsort label-800-1
SELECT pk, col0 FROM tab1 WHERE ((col0 >= 9))
----
198 values hashing to ba091ba410d1bb993688fbc2933893a1

query II rowsort label-800-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 >= 9)))
----
9
1

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab1_806
----
198 values hashing to ba091ba410d1bb993688fbc2933893a1

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab1_806
----
9
1

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 >= 9)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 >= 9)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_806 UNION ALL SELECT pk, col0 FROM view_2_tab1_806
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 >= 9)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 >= 9)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_806 UNION SELECT pk, col0 FROM view_2_tab1_806
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 >= 9)) ) AS tab1_806
----
99 values hashing to bac6cf5ee2072074c6851542bb2a5c96

query I rowsort label-800-3
SELECT * FROM view_3_tab1_806
----
99 values hashing to bac6cf5ee2072074c6851542bb2a5c96

query I rowsort label-800-3
SELECT pk FROM tab1 WHERE ((col0 >= 9))
----
99 values hashing to bac6cf5ee2072074c6851542bb2a5c96

statement ok
DROP VIEW view_1_tab1_806

statement ok
DROP VIEW view_2_tab1_806

statement ok
DROP VIEW view_3_tab1_806

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab2_806 AS SELECT pk FROM view_1_tab2_806

query II rowsort label-800-1
SELECT pk, col0 FROM tab2 WHERE ((col0 >= 9))
----
198 values hashing to ba091ba410d1bb993688fbc2933893a1

query II rowsort label-800-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 >= 9)))
----
9
1

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab2_806
----
198 values hashing to ba091ba410d1bb993688fbc2933893a1

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab2_806
----
9
1

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 >= 9)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 >= 9)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_806 UNION ALL SELECT pk, col0 FROM view_2_tab2_806
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 >= 9)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 >= 9)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_806 UNION SELECT pk, col0 FROM view_2_tab2_806
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 >= 9)) ) AS tab2_806
----
99 values hashing to bac6cf5ee2072074c6851542bb2a5c96

query I rowsort label-800-3
SELECT * FROM view_3_tab2_806
----
99 values hashing to bac6cf5ee2072074c6851542bb2a5c96

query I rowsort label-800-3
SELECT pk FROM tab2 WHERE ((col0 >= 9))
----
99 values hashing to bac6cf5ee2072074c6851542bb2a5c96

statement ok
DROP VIEW view_1_tab2_806

statement ok
DROP VIEW view_2_tab2_806

statement ok
DROP VIEW view_3_tab2_806

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab3_806 AS SELECT pk FROM view_1_tab3_806

query II rowsort label-800-1
SELECT pk, col0 FROM tab3 WHERE ((col0 >= 9))
----
198 values hashing to ba091ba410d1bb993688fbc2933893a1

query II rowsort label-800-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 >= 9)))
----
9
1

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab3_806
----
198 values hashing to ba091ba410d1bb993688fbc2933893a1

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab3_806
----
9
1

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 >= 9)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 >= 9)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_806 UNION ALL SELECT pk, col0 FROM view_2_tab3_806
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 >= 9)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 >= 9)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_806 UNION SELECT pk, col0 FROM view_2_tab3_806
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 >= 9)) ) AS tab3_806
----
99 values hashing to bac6cf5ee2072074c6851542bb2a5c96

query I rowsort label-800-3
SELECT * FROM view_3_tab3_806
----
99 values hashing to bac6cf5ee2072074c6851542bb2a5c96

query I rowsort label-800-3
SELECT pk FROM tab3 WHERE ((col0 >= 9))
----
99 values hashing to bac6cf5ee2072074c6851542bb2a5c96

statement ok
DROP VIEW view_1_tab3_806

statement ok
DROP VIEW view_2_tab3_806

statement ok
DROP VIEW view_3_tab3_806

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab4_806 AS SELECT pk FROM view_1_tab4_806

query II rowsort label-800-1
SELECT pk, col0 FROM tab4 WHERE ((col0 >= 9))
----
198 values hashing to ba091ba410d1bb993688fbc2933893a1

query II rowsort label-800-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 >= 9)))
----
9
1

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab4_806
----
198 values hashing to ba091ba410d1bb993688fbc2933893a1

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab4_806
----
9
1

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 >= 9)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 >= 9)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_806 UNION ALL SELECT pk, col0 FROM view_2_tab4_806
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 >= 9)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 >= 9)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_806 UNION SELECT pk, col0 FROM view_2_tab4_806
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 >= 9)) ) AS tab4_806
----
99 values hashing to bac6cf5ee2072074c6851542bb2a5c96

query I rowsort label-800-3
SELECT * FROM view_3_tab4_806
----
99 values hashing to bac6cf5ee2072074c6851542bb2a5c96

query I rowsort label-800-3
SELECT pk FROM tab4 WHERE ((col0 >= 9))
----
99 values hashing to bac6cf5ee2072074c6851542bb2a5c96

statement ok
DROP VIEW view_1_tab4_806

statement ok
DROP VIEW view_2_tab4_806

statement ok
DROP VIEW view_3_tab4_806

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_807 AS SELECT pk, col0 FROM tab0 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77

statement ok
CREATE VIEW view_2_tab0_807 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)

statement ok
CREATE VIEW view_3_tab0_807 AS SELECT pk FROM view_1_tab0_807

query II rowsort label-900-1
SELECT pk, col0 FROM tab0 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab0_807
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab0_807
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_807 UNION ALL SELECT pk, col0 FROM view_2_tab0_807
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_807 UNION SELECT pk, col0 FROM view_2_tab0_807
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77 ) AS tab0_807
----

query I rowsort label-900-3
SELECT * FROM view_3_tab0_807
----

query I rowsort label-900-3
SELECT pk FROM tab0 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77
----

statement ok
DROP VIEW view_1_tab0_807

statement ok
DROP VIEW view_2_tab0_807

statement ok
DROP VIEW view_3_tab0_807

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_807 AS SELECT pk, col0 FROM tab1 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77

statement ok
CREATE VIEW view_2_tab1_807 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)

statement ok
CREATE VIEW view_3_tab1_807 AS SELECT pk FROM view_1_tab1_807

query II rowsort label-900-1
SELECT pk, col0 FROM tab1 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab1_807
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab1_807
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_807 UNION ALL SELECT pk, col0 FROM view_2_tab1_807
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_807 UNION SELECT pk, col0 FROM view_2_tab1_807
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77 ) AS tab1_807
----

query I rowsort label-900-3
SELECT * FROM view_3_tab1_807
----

query I rowsort label-900-3
SELECT pk FROM tab1 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77
----

statement ok
DROP VIEW view_1_tab1_807

statement ok
DROP VIEW view_2_tab1_807

statement ok
DROP VIEW view_3_tab1_807

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_807 AS SELECT pk, col0 FROM tab2 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77

statement ok
CREATE VIEW view_2_tab2_807 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)

statement ok
CREATE VIEW view_3_tab2_807 AS SELECT pk FROM view_1_tab2_807

query II rowsort label-900-1
SELECT pk, col0 FROM tab2 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab2_807
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab2_807
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_807 UNION ALL SELECT pk, col0 FROM view_2_tab2_807
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_807 UNION SELECT pk, col0 FROM view_2_tab2_807
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77 ) AS tab2_807
----

query I rowsort label-900-3
SELECT * FROM view_3_tab2_807
----

query I rowsort label-900-3
SELECT pk FROM tab2 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77
----

statement ok
DROP VIEW view_1_tab2_807

statement ok
DROP VIEW view_2_tab2_807

statement ok
DROP VIEW view_3_tab2_807

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_807 AS SELECT pk, col0 FROM tab3 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77

statement ok
CREATE VIEW view_2_tab3_807 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)

statement ok
CREATE VIEW view_3_tab3_807 AS SELECT pk FROM view_1_tab3_807

query II rowsort label-900-1
SELECT pk, col0 FROM tab3 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab3_807
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab3_807
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_807 UNION ALL SELECT pk, col0 FROM view_2_tab3_807
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_807 UNION SELECT pk, col0 FROM view_2_tab3_807
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77 ) AS tab3_807
----

query I rowsort label-900-3
SELECT * FROM view_3_tab3_807
----

query I rowsort label-900-3
SELECT pk FROM tab3 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77
----

statement ok
DROP VIEW view_1_tab3_807

statement ok
DROP VIEW view_2_tab3_807

statement ok
DROP VIEW view_3_tab3_807

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_807 AS SELECT pk, col0 FROM tab4 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77

statement ok
CREATE VIEW view_2_tab4_807 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)

statement ok
CREATE VIEW view_3_tab4_807 AS SELECT pk FROM view_1_tab4_807

query II rowsort label-900-1
SELECT pk, col0 FROM tab4 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab4_807
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab4_807
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_807 UNION ALL SELECT pk, col0 FROM view_2_tab4_807
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_807 UNION SELECT pk, col0 FROM view_2_tab4_807
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77 ) AS tab4_807
----

query I rowsort label-900-3
SELECT * FROM view_3_tab4_807
----

query I rowsort label-900-3
SELECT pk FROM tab4 WHERE col4 <= 330.87 AND (col1 IN (407.60,346.33,55.94,650.67,157.91,954.15) AND col4 >= 700.87) AND col4 = 913.77
----

statement ok
DROP VIEW view_1_tab4_807

statement ok
DROP VIEW view_2_tab4_807

statement ok
DROP VIEW view_3_tab4_807

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_808 AS SELECT pk, col0 FROM tab0 WHERE col4 > 360.72

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

statement ok
CREATE VIEW view_3_tab0_808 AS SELECT pk FROM view_1_tab0_808

query II rowsort label-1000-1
SELECT pk, col0 FROM tab0 WHERE col4 > 360.72
----
124 values hashing to d12f9ead6766902bd20ddaa207de85f5

query II rowsort label-1000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 360.72)
----
76 values hashing to 6cb36b0e643d5608d6f2815a4e9cbabc

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab0_808
----
124 values hashing to d12f9ead6766902bd20ddaa207de85f5

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab0_808
----
76 values hashing to 6cb36b0e643d5608d6f2815a4e9cbabc

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 360.72 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 360.72)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_808 UNION ALL SELECT pk, col0 FROM view_2_tab0_808
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 360.72 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 360.72)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_808 UNION SELECT pk, col0 FROM view_2_tab0_808
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 > 360.72 ) AS tab0_808
----
62 values hashing to fd82df81677c15289fe0e5650e601d27

query I rowsort label-1000-3
SELECT * FROM view_3_tab0_808
----
62 values hashing to fd82df81677c15289fe0e5650e601d27

query I rowsort label-1000-3
SELECT pk FROM tab0 WHERE col4 > 360.72
----
62 values hashing to fd82df81677c15289fe0e5650e601d27

statement ok
DROP VIEW view_1_tab0_808

statement ok
DROP VIEW view_2_tab0_808

statement ok
DROP VIEW view_3_tab0_808

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_808 AS SELECT pk, col0 FROM tab1 WHERE col4 > 360.72

statement ok
CREATE VIEW view_2_tab1_808 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 360.72)

statement ok
CREATE VIEW view_3_tab1_808 AS SELECT pk FROM view_1_tab1_808

query II rowsort label-1000-1
SELECT pk, col0 FROM tab1 WHERE col4 > 360.72
----
124 values hashing to d12f9ead6766902bd20ddaa207de85f5

query II rowsort label-1000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 360.72)
----
76 values hashing to 6cb36b0e643d5608d6f2815a4e9cbabc

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab1_808
----
124 values hashing to d12f9ead6766902bd20ddaa207de85f5

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab1_808
----
76 values hashing to 6cb36b0e643d5608d6f2815a4e9cbabc

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 360.72 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 360.72)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_808 UNION ALL SELECT pk, col0 FROM view_2_tab1_808
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 360.72 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 360.72)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_808 UNION SELECT pk, col0 FROM view_2_tab1_808
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 > 360.72 ) AS tab1_808
----
62 values hashing to fd82df81677c15289fe0e5650e601d27

query I rowsort label-1000-3
SELECT * FROM view_3_tab1_808
----
62 values hashing to fd82df81677c15289fe0e5650e601d27

query I rowsort label-1000-3
SELECT pk FROM tab1 WHERE col4 > 360.72
----
62 values hashing to fd82df81677c15289fe0e5650e601d27

statement ok
DROP VIEW view_1_tab1_808

statement ok
DROP VIEW view_2_tab1_808

statement ok
DROP VIEW view_3_tab1_808

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_808 AS SELECT pk, col0 FROM tab2 WHERE col4 > 360.72

statement ok
CREATE VIEW view_2_tab2_808 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 360.72)

statement ok
CREATE VIEW view_3_tab2_808 AS SELECT pk FROM view_1_tab2_808

query II rowsort label-1000-1
SELECT pk, col0 FROM tab2 WHERE col4 > 360.72
----
124 values hashing to d12f9ead6766902bd20ddaa207de85f5

query II rowsort label-1000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 360.72)
----
76 values hashing to 6cb36b0e643d5608d6f2815a4e9cbabc

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab2_808
----
124 values hashing to d12f9ead6766902bd20ddaa207de85f5

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab2_808
----
76 values hashing to 6cb36b0e643d5608d6f2815a4e9cbabc

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 360.72 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 360.72)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_808 UNION ALL SELECT pk, col0 FROM view_2_tab2_808
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 360.72 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 360.72)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_808 UNION SELECT pk, col0 FROM view_2_tab2_808
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 > 360.72 ) AS tab2_808
----
62 values hashing to fd82df81677c15289fe0e5650e601d27

query I rowsort label-1000-3
SELECT * FROM view_3_tab2_808
----
62 values hashing to fd82df81677c15289fe0e5650e601d27

query I rowsort label-1000-3
SELECT pk FROM tab2 WHERE col4 > 360.72
----
62 values hashing to fd82df81677c15289fe0e5650e601d27

statement ok
DROP VIEW view_1_tab2_808

statement ok
DROP VIEW view_2_tab2_808

statement ok
DROP VIEW view_3_tab2_808

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_808 AS SELECT pk, col0 FROM tab3 WHERE col4 > 360.72

statement ok
CREATE VIEW view_2_tab3_808 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 360.72)

statement ok
CREATE VIEW view_3_tab3_808 AS SELECT pk FROM view_1_tab3_808

query II rowsort label-1000-1
SELECT pk, col0 FROM tab3 WHERE col4 > 360.72
----
124 values hashing to d12f9ead6766902bd20ddaa207de85f5

query II rowsort label-1000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 360.72)
----
76 values hashing to 6cb36b0e643d5608d6f2815a4e9cbabc

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab3_808
----
124 values hashing to d12f9ead6766902bd20ddaa207de85f5

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab3_808
----
76 values hashing to 6cb36b0e643d5608d6f2815a4e9cbabc

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 360.72 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 360.72)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_808 UNION ALL SELECT pk, col0 FROM view_2_tab3_808
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 360.72 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 360.72)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_808 UNION SELECT pk, col0 FROM view_2_tab3_808
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 > 360.72 ) AS tab3_808
----
62 values hashing to fd82df81677c15289fe0e5650e601d27

query I rowsort label-1000-3
SELECT * FROM view_3_tab3_808
----
62 values hashing to fd82df81677c15289fe0e5650e601d27

query I rowsort label-1000-3
SELECT pk FROM tab3 WHERE col4 > 360.72
----
62 values hashing to fd82df81677c15289fe0e5650e601d27

statement ok
DROP VIEW view_1_tab3_808

statement ok
DROP VIEW view_2_tab3_808

statement ok
DROP VIEW view_3_tab3_808

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_808 AS SELECT pk, col0 FROM tab4 WHERE col4 > 360.72

statement ok
CREATE VIEW view_2_tab4_808 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 360.72)

statement ok
CREATE VIEW view_3_tab4_808 AS SELECT pk FROM view_1_tab4_808

query II rowsort label-1000-1
SELECT pk, col0 FROM tab4 WHERE col4 > 360.72
----
124 values hashing to d12f9ead6766902bd20ddaa207de85f5

query II rowsort label-1000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 360.72)
----
76 values hashing to 6cb36b0e643d5608d6f2815a4e9cbabc

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab4_808
----
124 values hashing to d12f9ead6766902bd20ddaa207de85f5

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab4_808
----
76 values hashing to 6cb36b0e643d5608d6f2815a4e9cbabc

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 360.72 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 360.72)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_808 UNION ALL SELECT pk, col0 FROM view_2_tab4_808
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 360.72 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 360.72)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_808 UNION SELECT pk, col0 FROM view_2_tab4_808
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 > 360.72 ) AS tab4_808
----
62 values hashing to fd82df81677c15289fe0e5650e601d27

query I rowsort label-1000-3
SELECT * FROM view_3_tab4_808
----
62 values hashing to fd82df81677c15289fe0e5650e601d27

query I rowsort label-1000-3
SELECT pk FROM tab4 WHERE col4 > 360.72
----
62 values hashing to fd82df81677c15289fe0e5650e601d27

statement ok
DROP VIEW view_1_tab4_808

statement ok
DROP VIEW view_2_tab4_808

statement ok
DROP VIEW view_3_tab4_808

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_810 AS SELECT pk, col0 FROM tab0 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389)

statement ok
CREATE VIEW view_2_tab0_810 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))

statement ok
CREATE VIEW view_3_tab0_810 AS SELECT pk FROM view_1_tab0_810

query II rowsort label-1100-1
SELECT pk, col0 FROM tab0 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389)
----
134 values hashing to 3106cedb1a928f2d7167fa843a51a235

query II rowsort label-1100-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))
----
66 values hashing to 018fa82c28893c4e4f022f51b3e47f26

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab0_810
----
134 values hashing to 3106cedb1a928f2d7167fa843a51a235

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab0_810
----
66 values hashing to 018fa82c28893c4e4f022f51b3e47f26

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_810 UNION ALL SELECT pk, col0 FROM view_2_tab0_810
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_810 UNION SELECT pk, col0 FROM view_2_tab0_810
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389) ) AS tab0_810
----
67 values hashing to 36f5eec3dad572ec8f6275c28e26024e

query I rowsort label-1100-3
SELECT * FROM view_3_tab0_810
----
67 values hashing to 36f5eec3dad572ec8f6275c28e26024e

query I rowsort label-1100-3
SELECT pk FROM tab0 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389)
----
67 values hashing to 36f5eec3dad572ec8f6275c28e26024e

statement ok
DROP VIEW view_1_tab0_810

statement ok
DROP VIEW view_2_tab0_810

statement ok
DROP VIEW view_3_tab0_810

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_810 AS SELECT pk, col0 FROM tab1 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389)

statement ok
CREATE VIEW view_2_tab1_810 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))

statement ok
CREATE VIEW view_3_tab1_810 AS SELECT pk FROM view_1_tab1_810

query II rowsort label-1100-1
SELECT pk, col0 FROM tab1 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389)
----
134 values hashing to 3106cedb1a928f2d7167fa843a51a235

query II rowsort label-1100-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))
----
66 values hashing to 018fa82c28893c4e4f022f51b3e47f26

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab1_810
----
134 values hashing to 3106cedb1a928f2d7167fa843a51a235

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab1_810
----
66 values hashing to 018fa82c28893c4e4f022f51b3e47f26

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_810 UNION ALL SELECT pk, col0 FROM view_2_tab1_810
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_810 UNION SELECT pk, col0 FROM view_2_tab1_810
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389) ) AS tab1_810
----
67 values hashing to 36f5eec3dad572ec8f6275c28e26024e

query I rowsort label-1100-3
SELECT * FROM view_3_tab1_810
----
67 values hashing to 36f5eec3dad572ec8f6275c28e26024e

query I rowsort label-1100-3
SELECT pk FROM tab1 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389)
----
67 values hashing to 36f5eec3dad572ec8f6275c28e26024e

statement ok
DROP VIEW view_1_tab1_810

statement ok
DROP VIEW view_2_tab1_810

statement ok
DROP VIEW view_3_tab1_810

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_810 AS SELECT pk, col0 FROM tab2 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389)

statement ok
CREATE VIEW view_2_tab2_810 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))

statement ok
CREATE VIEW view_3_tab2_810 AS SELECT pk FROM view_1_tab2_810

query II rowsort label-1100-1
SELECT pk, col0 FROM tab2 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389)
----
134 values hashing to 3106cedb1a928f2d7167fa843a51a235

query II rowsort label-1100-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))
----
66 values hashing to 018fa82c28893c4e4f022f51b3e47f26

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab2_810
----
134 values hashing to 3106cedb1a928f2d7167fa843a51a235

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab2_810
----
66 values hashing to 018fa82c28893c4e4f022f51b3e47f26

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_810 UNION ALL SELECT pk, col0 FROM view_2_tab2_810
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_810 UNION SELECT pk, col0 FROM view_2_tab2_810
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389) ) AS tab2_810
----
67 values hashing to 36f5eec3dad572ec8f6275c28e26024e

query I rowsort label-1100-3
SELECT * FROM view_3_tab2_810
----
67 values hashing to 36f5eec3dad572ec8f6275c28e26024e

query I rowsort label-1100-3
SELECT pk FROM tab2 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389)
----
67 values hashing to 36f5eec3dad572ec8f6275c28e26024e

statement ok
DROP VIEW view_1_tab2_810

statement ok
DROP VIEW view_2_tab2_810

statement ok
DROP VIEW view_3_tab2_810

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_810 AS SELECT pk, col0 FROM tab3 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389)

statement ok
CREATE VIEW view_2_tab3_810 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))

statement ok
CREATE VIEW view_3_tab3_810 AS SELECT pk FROM view_1_tab3_810

query II rowsort label-1100-1
SELECT pk, col0 FROM tab3 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389)
----
134 values hashing to 3106cedb1a928f2d7167fa843a51a235

query II rowsort label-1100-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))
----
66 values hashing to 018fa82c28893c4e4f022f51b3e47f26

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab3_810
----
134 values hashing to 3106cedb1a928f2d7167fa843a51a235

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab3_810
----
66 values hashing to 018fa82c28893c4e4f022f51b3e47f26

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_810 UNION ALL SELECT pk, col0 FROM view_2_tab3_810
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_810 UNION SELECT pk, col0 FROM view_2_tab3_810
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389) ) AS tab3_810
----
67 values hashing to 36f5eec3dad572ec8f6275c28e26024e

query I rowsort label-1100-3
SELECT * FROM view_3_tab3_810
----
67 values hashing to 36f5eec3dad572ec8f6275c28e26024e

query I rowsort label-1100-3
SELECT pk FROM tab3 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389)
----
67 values hashing to 36f5eec3dad572ec8f6275c28e26024e

statement ok
DROP VIEW view_1_tab3_810

statement ok
DROP VIEW view_2_tab3_810

statement ok
DROP VIEW view_3_tab3_810

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_810 AS SELECT pk, col0 FROM tab4 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389)

statement ok
CREATE VIEW view_2_tab4_810 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))

statement ok
CREATE VIEW view_3_tab4_810 AS SELECT pk FROM view_1_tab4_810

query II rowsort label-1100-1
SELECT pk, col0 FROM tab4 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389)
----
134 values hashing to 3106cedb1a928f2d7167fa843a51a235

query II rowsort label-1100-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))
----
66 values hashing to 018fa82c28893c4e4f022f51b3e47f26

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab4_810
----
134 values hashing to 3106cedb1a928f2d7167fa843a51a235

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab4_810
----
66 values hashing to 018fa82c28893c4e4f022f51b3e47f26

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_810 UNION ALL SELECT pk, col0 FROM view_2_tab4_810
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_810 UNION SELECT pk, col0 FROM view_2_tab4_810
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389) ) AS tab4_810
----
67 values hashing to 36f5eec3dad572ec8f6275c28e26024e

query I rowsort label-1100-3
SELECT * FROM view_3_tab4_810
----
67 values hashing to 36f5eec3dad572ec8f6275c28e26024e

query I rowsort label-1100-3
SELECT pk FROM tab4 WHERE ((col3 < 745 AND col1 >= 529.81 OR col1 > 630.95 OR (col3 <= 912) OR col3 > 347 AND col1 BETWEEN 300.31 AND 315.36 AND col0 < 165 AND (col0 < 348) AND (col4 >= 792.27) OR col3 = 791 OR (col4 IS NULL)) AND (col0 IS NULL) OR col0 >= 389)
----
67 values hashing to 36f5eec3dad572ec8f6275c28e26024e

statement ok
DROP VIEW view_1_tab4_810

statement ok
DROP VIEW view_2_tab4_810

statement ok
DROP VIEW view_3_tab4_810

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_811 AS SELECT pk, col0 FROM tab0 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917)

statement ok
CREATE VIEW view_2_tab0_811 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))

statement ok
CREATE VIEW view_3_tab0_811 AS SELECT pk FROM view_1_tab0_811

query II rowsort label-1200-1
SELECT pk, col0 FROM tab0 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917)
----
198 values hashing to ad31220f35e1670c3e7592023ce2eb42

query II rowsort label-1200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))
----
38
997

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab0_811
----
198 values hashing to ad31220f35e1670c3e7592023ce2eb42

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab0_811
----
38
997

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_811 UNION ALL SELECT pk, col0 FROM view_2_tab0_811
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_811 UNION SELECT pk, col0 FROM view_2_tab0_811
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917) ) AS tab0_811
----
99 values hashing to c9d09709e576f181d867541892fc042a

query I rowsort label-1200-3
SELECT * FROM view_3_tab0_811
----
99 values hashing to c9d09709e576f181d867541892fc042a

query I rowsort label-1200-3
SELECT pk FROM tab0 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917)
----
99 values hashing to c9d09709e576f181d867541892fc042a

statement ok
DROP VIEW view_1_tab0_811

statement ok
DROP VIEW view_2_tab0_811

statement ok
DROP VIEW view_3_tab0_811

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_811 AS SELECT pk, col0 FROM tab1 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917)

statement ok
CREATE VIEW view_2_tab1_811 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))

statement ok
CREATE VIEW view_3_tab1_811 AS SELECT pk FROM view_1_tab1_811

query II rowsort label-1200-1
SELECT pk, col0 FROM tab1 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917)
----
198 values hashing to ad31220f35e1670c3e7592023ce2eb42

query II rowsort label-1200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))
----
38
997

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab1_811
----
198 values hashing to ad31220f35e1670c3e7592023ce2eb42

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab1_811
----
38
997

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_811 UNION ALL SELECT pk, col0 FROM view_2_tab1_811
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_811 UNION SELECT pk, col0 FROM view_2_tab1_811
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917) ) AS tab1_811
----
99 values hashing to c9d09709e576f181d867541892fc042a

query I rowsort label-1200-3
SELECT * FROM view_3_tab1_811
----
99 values hashing to c9d09709e576f181d867541892fc042a

query I rowsort label-1200-3
SELECT pk FROM tab1 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917)
----
99 values hashing to c9d09709e576f181d867541892fc042a

statement ok
DROP VIEW view_1_tab1_811

statement ok
DROP VIEW view_2_tab1_811

statement ok
DROP VIEW view_3_tab1_811

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_811 AS SELECT pk, col0 FROM tab2 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917)

statement ok
CREATE VIEW view_2_tab2_811 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))

statement ok
CREATE VIEW view_3_tab2_811 AS SELECT pk FROM view_1_tab2_811

query II rowsort label-1200-1
SELECT pk, col0 FROM tab2 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917)
----
198 values hashing to ad31220f35e1670c3e7592023ce2eb42

query II rowsort label-1200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))
----
38
997

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab2_811
----
198 values hashing to ad31220f35e1670c3e7592023ce2eb42

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab2_811
----
38
997

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_811 UNION ALL SELECT pk, col0 FROM view_2_tab2_811
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_811 UNION SELECT pk, col0 FROM view_2_tab2_811
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917) ) AS tab2_811
----
99 values hashing to c9d09709e576f181d867541892fc042a

query I rowsort label-1200-3
SELECT * FROM view_3_tab2_811
----
99 values hashing to c9d09709e576f181d867541892fc042a

query I rowsort label-1200-3
SELECT pk FROM tab2 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917)
----
99 values hashing to c9d09709e576f181d867541892fc042a

statement ok
DROP VIEW view_1_tab2_811

statement ok
DROP VIEW view_2_tab2_811

statement ok
DROP VIEW view_3_tab2_811

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_811 AS SELECT pk, col0 FROM tab3 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917)

statement ok
CREATE VIEW view_2_tab3_811 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))

statement ok
CREATE VIEW view_3_tab3_811 AS SELECT pk FROM view_1_tab3_811

query II rowsort label-1200-1
SELECT pk, col0 FROM tab3 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917)
----
198 values hashing to ad31220f35e1670c3e7592023ce2eb42

query II rowsort label-1200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))
----
38
997

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab3_811
----
198 values hashing to ad31220f35e1670c3e7592023ce2eb42

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab3_811
----
38
997

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_811 UNION ALL SELECT pk, col0 FROM view_2_tab3_811
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_811 UNION SELECT pk, col0 FROM view_2_tab3_811
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917) ) AS tab3_811
----
99 values hashing to c9d09709e576f181d867541892fc042a

query I rowsort label-1200-3
SELECT * FROM view_3_tab3_811
----
99 values hashing to c9d09709e576f181d867541892fc042a

query I rowsort label-1200-3
SELECT pk FROM tab3 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917)
----
99 values hashing to c9d09709e576f181d867541892fc042a

statement ok
DROP VIEW view_1_tab3_811

statement ok
DROP VIEW view_2_tab3_811

statement ok
DROP VIEW view_3_tab3_811

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_811 AS SELECT pk, col0 FROM tab4 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917)

statement ok
CREATE VIEW view_2_tab4_811 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))

statement ok
CREATE VIEW view_3_tab4_811 AS SELECT pk FROM view_1_tab4_811

query II rowsort label-1200-1
SELECT pk, col0 FROM tab4 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917)
----
198 values hashing to ad31220f35e1670c3e7592023ce2eb42

query II rowsort label-1200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))
----
38
997

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab4_811
----
198 values hashing to ad31220f35e1670c3e7592023ce2eb42

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab4_811
----
38
997

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_811 UNION ALL SELECT pk, col0 FROM view_2_tab4_811
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_811 UNION SELECT pk, col0 FROM view_2_tab4_811
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917) ) AS tab4_811
----
99 values hashing to c9d09709e576f181d867541892fc042a

query I rowsort label-1200-3
SELECT * FROM view_3_tab4_811
----
99 values hashing to c9d09709e576f181d867541892fc042a

query I rowsort label-1200-3
SELECT pk FROM tab4 WHERE (col3 <= 515 AND (((col3 IN (25,177,820,947,826,625) OR col1 >= 765.0 AND (col3 > 529) OR col0 > 185 OR ((col3 >= 232 OR (col0 IS NULL)))) AND (((col0 < 904) OR col0 > 850 AND col0 < 967) AND col0 > 111) AND (((col0 >= 284))))) OR col3 > 206) OR ((col0 <= 824) AND (col3 >= 441)) AND (((col4 = 857.8))) OR (((col4 <= 104.32 OR col1 IS NULL))) OR col0 < 569 OR col1 > 235.47 AND ((col0 >= 555) OR col3 < 586 AND col3 > 450 AND ((col1 <= 868.0 OR col4 > 817.49)) AND col0 <= 749 AND ((col0 < 685 AND (col3 < 5) AND col3 >= 82 OR col0 < 434 OR (col0 > 552) AND col4 < 148.58 OR col0 = 277 AND col3 IS NULL AND (((col3 BETWEEN 841 AND 145 OR col0 IS NULL OR col1 >= 235.0))) AND col1 > 917.90 OR (((col1 >= 981.81) AND col0 > 786))) OR col1 < 697.4 AND col3 = 550 OR col1 > 459.64 AND (col3 IN (968,528,218,911,440))) AND col3 IS NULL AND col0 < 314) AND ((col3 > 502)) OR (col0 > 148) AND col3 >= 676 AND ((((col0 < 118)))) AND (col0 > 971) OR ((col1 < 648.23 OR col3 > 882 AND col3 > 769 AND col0 < 997)) AND ((col1 IN (267.98,875.27,137.71) OR col3 <= 716) AND ((((col3 > 58) OR col4 <= 924.21))) AND col0 <= 291) OR (col3 = 727 AND (col0 BETWEEN 410 AND 352) AND col4 >= 832.88 OR col4 <= 951.21 AND col0 < 448 AND col3 <= 166 OR col3 >= 639) AND col1 > 670.21 AND col3 IN (917)
----
99 values hashing to c9d09709e576f181d867541892fc042a

statement ok
DROP VIEW view_1_tab4_811

statement ok
DROP VIEW view_2_tab4_811

statement ok
DROP VIEW view_3_tab4_811

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_813 AS SELECT pk, col0 FROM tab0 WHERE col0 IN (752,49,495,682)

statement ok
CREATE VIEW view_2_tab0_813 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (752,49,495,682))

statement ok
CREATE VIEW view_3_tab0_813 AS SELECT pk FROM view_1_tab0_813

query II rowsort label-1300-1
SELECT pk, col0 FROM tab0 WHERE col0 IN (752,49,495,682)
----
49
495

query II rowsort label-1300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (752,49,495,682))
----
198 values hashing to 858e3b97078a3d5dd3fc049efaaab930

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab0_813
----
49
495

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab0_813
----
198 values hashing to 858e3b97078a3d5dd3fc049efaaab930

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IN (752,49,495,682) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (752,49,495,682))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_813 UNION ALL SELECT pk, col0 FROM view_2_tab0_813
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IN (752,49,495,682) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (752,49,495,682))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_813 UNION SELECT pk, col0 FROM view_2_tab0_813
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 IN (752,49,495,682) ) AS tab0_813
----
49

query I rowsort label-1300-3
SELECT * FROM view_3_tab0_813
----
49

query I rowsort label-1300-3
SELECT pk FROM tab0 WHERE col0 IN (752,49,495,682)
----
49

statement ok
DROP VIEW view_1_tab0_813

statement ok
DROP VIEW view_2_tab0_813

statement ok
DROP VIEW view_3_tab0_813

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_813 AS SELECT pk, col0 FROM tab1 WHERE col0 IN (752,49,495,682)

statement ok
CREATE VIEW view_2_tab1_813 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (752,49,495,682))

statement ok
CREATE VIEW view_3_tab1_813 AS SELECT pk FROM view_1_tab1_813

query II rowsort label-1300-1
SELECT pk, col0 FROM tab1 WHERE col0 IN (752,49,495,682)
----
49
495

query II rowsort label-1300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (752,49,495,682))
----
198 values hashing to 858e3b97078a3d5dd3fc049efaaab930

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab1_813
----
49
495

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab1_813
----
198 values hashing to 858e3b97078a3d5dd3fc049efaaab930

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IN (752,49,495,682) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (752,49,495,682))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_813 UNION ALL SELECT pk, col0 FROM view_2_tab1_813
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IN (752,49,495,682) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (752,49,495,682))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_813 UNION SELECT pk, col0 FROM view_2_tab1_813
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 IN (752,49,495,682) ) AS tab1_813
----
49

query I rowsort label-1300-3
SELECT * FROM view_3_tab1_813
----
49

query I rowsort label-1300-3
SELECT pk FROM tab1 WHERE col0 IN (752,49,495,682)
----
49

statement ok
DROP VIEW view_1_tab1_813

statement ok
DROP VIEW view_2_tab1_813

statement ok
DROP VIEW view_3_tab1_813

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_813 AS SELECT pk, col0 FROM tab2 WHERE col0 IN (752,49,495,682)

statement ok
CREATE VIEW view_2_tab2_813 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (752,49,495,682))

statement ok
CREATE VIEW view_3_tab2_813 AS SELECT pk FROM view_1_tab2_813

query II rowsort label-1300-1
SELECT pk, col0 FROM tab2 WHERE col0 IN (752,49,495,682)
----
49
495

query II rowsort label-1300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (752,49,495,682))
----
198 values hashing to 858e3b97078a3d5dd3fc049efaaab930

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab2_813
----
49
495

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab2_813
----
198 values hashing to 858e3b97078a3d5dd3fc049efaaab930

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IN (752,49,495,682) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (752,49,495,682))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_813 UNION ALL SELECT pk, col0 FROM view_2_tab2_813
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IN (752,49,495,682) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (752,49,495,682))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_813 UNION SELECT pk, col0 FROM view_2_tab2_813
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 IN (752,49,495,682) ) AS tab2_813
----
49

query I rowsort label-1300-3
SELECT * FROM view_3_tab2_813
----
49

query I rowsort label-1300-3
SELECT pk FROM tab2 WHERE col0 IN (752,49,495,682)
----
49

statement ok
DROP VIEW view_1_tab2_813

statement ok
DROP VIEW view_2_tab2_813

statement ok
DROP VIEW view_3_tab2_813

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_813 AS SELECT pk, col0 FROM tab3 WHERE col0 IN (752,49,495,682)

statement ok
CREATE VIEW view_2_tab3_813 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (752,49,495,682))

statement ok
CREATE VIEW view_3_tab3_813 AS SELECT pk FROM view_1_tab3_813

query II rowsort label-1300-1
SELECT pk, col0 FROM tab3 WHERE col0 IN (752,49,495,682)
----
49
495

query II rowsort label-1300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (752,49,495,682))
----
198 values hashing to 858e3b97078a3d5dd3fc049efaaab930

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab3_813
----
49
495

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab3_813
----
198 values hashing to 858e3b97078a3d5dd3fc049efaaab930

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IN (752,49,495,682) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (752,49,495,682))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_813 UNION ALL SELECT pk, col0 FROM view_2_tab3_813
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IN (752,49,495,682) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (752,49,495,682))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_813 UNION SELECT pk, col0 FROM view_2_tab3_813
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 IN (752,49,495,682) ) AS tab3_813
----
49

query I rowsort label-1300-3
SELECT * FROM view_3_tab3_813
----
49

query I rowsort label-1300-3
SELECT pk FROM tab3 WHERE col0 IN (752,49,495,682)
----
49

statement ok
DROP VIEW view_1_tab3_813

statement ok
DROP VIEW view_2_tab3_813

statement ok
DROP VIEW view_3_tab3_813

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_813 AS SELECT pk, col0 FROM tab4 WHERE col0 IN (752,49,495,682)

statement ok
CREATE VIEW view_2_tab4_813 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (752,49,495,682))

statement ok
CREATE VIEW view_3_tab4_813 AS SELECT pk FROM view_1_tab4_813

query II rowsort label-1300-1
SELECT pk, col0 FROM tab4 WHERE col0 IN (752,49,495,682)
----
49
495

query II rowsort label-1300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (752,49,495,682))
----
198 values hashing to 858e3b97078a3d5dd3fc049efaaab930

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab4_813
----
49
495

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab4_813
----
198 values hashing to 858e3b97078a3d5dd3fc049efaaab930

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IN (752,49,495,682) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (752,49,495,682))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_813 UNION ALL SELECT pk, col0 FROM view_2_tab4_813
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IN (752,49,495,682) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (752,49,495,682))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_813 UNION SELECT pk, col0 FROM view_2_tab4_813
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 IN (752,49,495,682) ) AS tab4_813
----
49

query I rowsort label-1300-3
SELECT * FROM view_3_tab4_813
----
49

query I rowsort label-1300-3
SELECT pk FROM tab4 WHERE col0 IN (752,49,495,682)
----
49

statement ok
DROP VIEW view_1_tab4_813

statement ok
DROP VIEW view_2_tab4_813

statement ok
DROP VIEW view_3_tab4_813

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_814 AS SELECT pk, col0 FROM tab0 WHERE (col1 = 156.80 AND col0 < 589)

statement ok
CREATE VIEW view_2_tab0_814 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 = 156.80 AND col0 < 589))

statement ok
CREATE VIEW view_3_tab0_814 AS SELECT pk FROM view_1_tab0_814

query II rowsort label-1400-1
SELECT pk, col0 FROM tab0 WHERE (col1 = 156.80 AND col0 < 589)
----

query II rowsort label-1400-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 = 156.80 AND col0 < 589))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab0_814
----

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab0_814
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 = 156.80 AND col0 < 589) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 = 156.80 AND col0 < 589))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_814 UNION ALL SELECT pk, col0 FROM view_2_tab0_814
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 = 156.80 AND col0 < 589) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 = 156.80 AND col0 < 589))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_814 UNION SELECT pk, col0 FROM view_2_tab0_814
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 = 156.80 AND col0 < 589) ) AS tab0_814
----

query I rowsort label-1400-3
SELECT * FROM view_3_tab0_814
----

query I rowsort label-1400-3
SELECT pk FROM tab0 WHERE (col1 = 156.80 AND col0 < 589)
----

statement ok
DROP VIEW view_1_tab0_814

statement ok
DROP VIEW view_2_tab0_814

statement ok
DROP VIEW view_3_tab0_814

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_814 AS SELECT pk, col0 FROM tab1 WHERE (col1 = 156.80 AND col0 < 589)

statement ok
CREATE VIEW view_2_tab1_814 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 = 156.80 AND col0 < 589))

statement ok
CREATE VIEW view_3_tab1_814 AS SELECT pk FROM view_1_tab1_814

query II rowsort label-1400-1
SELECT pk, col0 FROM tab1 WHERE (col1 = 156.80 AND col0 < 589)
----

query II rowsort label-1400-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 = 156.80 AND col0 < 589))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab1_814
----

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab1_814
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 = 156.80 AND col0 < 589) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 = 156.80 AND col0 < 589))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_814 UNION ALL SELECT pk, col0 FROM view_2_tab1_814
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 = 156.80 AND col0 < 589) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 = 156.80 AND col0 < 589))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_814 UNION SELECT pk, col0 FROM view_2_tab1_814
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 = 156.80 AND col0 < 589) ) AS tab1_814
----

query I rowsort label-1400-3
SELECT * FROM view_3_tab1_814
----

query I rowsort label-1400-3
SELECT pk FROM tab1 WHERE (col1 = 156.80 AND col0 < 589)
----

statement ok
DROP VIEW view_1_tab1_814

statement ok
DROP VIEW view_2_tab1_814

statement ok
DROP VIEW view_3_tab1_814

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_814 AS SELECT pk, col0 FROM tab2 WHERE (col1 = 156.80 AND col0 < 589)

statement ok
CREATE VIEW view_2_tab2_814 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 = 156.80 AND col0 < 589))

statement ok
CREATE VIEW view_3_tab2_814 AS SELECT pk FROM view_1_tab2_814

query II rowsort label-1400-1
SELECT pk, col0 FROM tab2 WHERE (col1 = 156.80 AND col0 < 589)
----

query II rowsort label-1400-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 = 156.80 AND col0 < 589))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab2_814
----

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab2_814
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 = 156.80 AND col0 < 589) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 = 156.80 AND col0 < 589))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_814 UNION ALL SELECT pk, col0 FROM view_2_tab2_814
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 = 156.80 AND col0 < 589) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 = 156.80 AND col0 < 589))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_814 UNION SELECT pk, col0 FROM view_2_tab2_814
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 = 156.80 AND col0 < 589) ) AS tab2_814
----

query I rowsort label-1400-3
SELECT * FROM view_3_tab2_814
----

query I rowsort label-1400-3
SELECT pk FROM tab2 WHERE (col1 = 156.80 AND col0 < 589)
----

statement ok
DROP VIEW view_1_tab2_814

statement ok
DROP VIEW view_2_tab2_814

statement ok
DROP VIEW view_3_tab2_814

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_814 AS SELECT pk, col0 FROM tab3 WHERE (col1 = 156.80 AND col0 < 589)

statement ok
CREATE VIEW view_2_tab3_814 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 = 156.80 AND col0 < 589))

statement ok
CREATE VIEW view_3_tab3_814 AS SELECT pk FROM view_1_tab3_814

query II rowsort label-1400-1
SELECT pk, col0 FROM tab3 WHERE (col1 = 156.80 AND col0 < 589)
----

query II rowsort label-1400-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 = 156.80 AND col0 < 589))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab3_814
----

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab3_814
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 = 156.80 AND col0 < 589) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 = 156.80 AND col0 < 589))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_814 UNION ALL SELECT pk, col0 FROM view_2_tab3_814
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 = 156.80 AND col0 < 589) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 = 156.80 AND col0 < 589))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_814 UNION SELECT pk, col0 FROM view_2_tab3_814
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 = 156.80 AND col0 < 589) ) AS tab3_814
----

query I rowsort label-1400-3
SELECT * FROM view_3_tab3_814
----

query I rowsort label-1400-3
SELECT pk FROM tab3 WHERE (col1 = 156.80 AND col0 < 589)
----

statement ok
DROP VIEW view_1_tab3_814

statement ok
DROP VIEW view_2_tab3_814

statement ok
DROP VIEW view_3_tab3_814

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_814 AS SELECT pk, col0 FROM tab4 WHERE (col1 = 156.80 AND col0 < 589)

statement ok
CREATE VIEW view_2_tab4_814 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 = 156.80 AND col0 < 589))

statement ok
CREATE VIEW view_3_tab4_814 AS SELECT pk FROM view_1_tab4_814

query II rowsort label-1400-1
SELECT pk, col0 FROM tab4 WHERE (col1 = 156.80 AND col0 < 589)
----

query II rowsort label-1400-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 = 156.80 AND col0 < 589))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab4_814
----

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab4_814
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 = 156.80 AND col0 < 589) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 = 156.80 AND col0 < 589))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_814 UNION ALL SELECT pk, col0 FROM view_2_tab4_814
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 = 156.80 AND col0 < 589) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 = 156.80 AND col0 < 589))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_814 UNION SELECT pk, col0 FROM view_2_tab4_814
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 = 156.80 AND col0 < 589) ) AS tab4_814
----

query I rowsort label-1400-3
SELECT * FROM view_3_tab4_814
----

query I rowsort label-1400-3
SELECT pk FROM tab4 WHERE (col1 = 156.80 AND col0 < 589)
----

statement ok
DROP VIEW view_1_tab4_814

statement ok
DROP VIEW view_2_tab4_814

statement ok
DROP VIEW view_3_tab4_814

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_815 AS SELECT pk, col0 FROM tab0 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977

statement ok
CREATE VIEW view_2_tab0_815 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)

statement ok
CREATE VIEW view_3_tab0_815 AS SELECT pk FROM view_1_tab0_815

query II rowsort label-1500-1
SELECT pk, col0 FROM tab0 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab0_815
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab0_815
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_815 UNION ALL SELECT pk, col0 FROM view_2_tab0_815
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_815 UNION SELECT pk, col0 FROM view_2_tab0_815
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977 ) AS tab0_815
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab0_815
----

query I rowsort label-1500-3
SELECT pk FROM tab0 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977
----

statement ok
DROP VIEW view_1_tab0_815

statement ok
DROP VIEW view_2_tab0_815

statement ok
DROP VIEW view_3_tab0_815

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_815 AS SELECT pk, col0 FROM tab1 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977

statement ok
CREATE VIEW view_2_tab1_815 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)

statement ok
CREATE VIEW view_3_tab1_815 AS SELECT pk FROM view_1_tab1_815

query II rowsort label-1500-1
SELECT pk, col0 FROM tab1 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab1_815
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab1_815
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_815 UNION ALL SELECT pk, col0 FROM view_2_tab1_815
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_815 UNION SELECT pk, col0 FROM view_2_tab1_815
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977 ) AS tab1_815
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab1_815
----

query I rowsort label-1500-3
SELECT pk FROM tab1 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977
----

statement ok
DROP VIEW view_1_tab1_815

statement ok
DROP VIEW view_2_tab1_815

statement ok
DROP VIEW view_3_tab1_815

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_815 AS SELECT pk, col0 FROM tab2 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977

statement ok
CREATE VIEW view_2_tab2_815 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)

statement ok
CREATE VIEW view_3_tab2_815 AS SELECT pk FROM view_1_tab2_815

query II rowsort label-1500-1
SELECT pk, col0 FROM tab2 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab2_815
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab2_815
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_815 UNION ALL SELECT pk, col0 FROM view_2_tab2_815
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_815 UNION SELECT pk, col0 FROM view_2_tab2_815
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977 ) AS tab2_815
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab2_815
----

query I rowsort label-1500-3
SELECT pk FROM tab2 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977
----

statement ok
DROP VIEW view_1_tab2_815

statement ok
DROP VIEW view_2_tab2_815

statement ok
DROP VIEW view_3_tab2_815

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_815 AS SELECT pk, col0 FROM tab3 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977

statement ok
CREATE VIEW view_2_tab3_815 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)

statement ok
CREATE VIEW view_3_tab3_815 AS SELECT pk FROM view_1_tab3_815

query II rowsort label-1500-1
SELECT pk, col0 FROM tab3 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab3_815
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab3_815
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_815 UNION ALL SELECT pk, col0 FROM view_2_tab3_815
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_815 UNION SELECT pk, col0 FROM view_2_tab3_815
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977 ) AS tab3_815
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab3_815
----

query I rowsort label-1500-3
SELECT pk FROM tab3 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977
----

statement ok
DROP VIEW view_1_tab3_815

statement ok
DROP VIEW view_2_tab3_815

statement ok
DROP VIEW view_3_tab3_815

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_815 AS SELECT pk, col0 FROM tab4 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977

statement ok
CREATE VIEW view_2_tab4_815 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)

statement ok
CREATE VIEW view_3_tab4_815 AS SELECT pk FROM view_1_tab4_815

query II rowsort label-1500-1
SELECT pk, col0 FROM tab4 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab4_815
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab4_815
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_815 UNION ALL SELECT pk, col0 FROM view_2_tab4_815
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_815 UNION SELECT pk, col0 FROM view_2_tab4_815
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977 ) AS tab4_815
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab4_815
----

query I rowsort label-1500-3
SELECT pk FROM tab4 WHERE col4 >= 54.81 AND (col0 < 14) AND (col3 IS NULL OR (col1 > 729.12 AND (col3 < 655 AND col3 IS NULL)) OR col3 < 898) AND col0 >= 977
----

statement ok
DROP VIEW view_1_tab4_815

statement ok
DROP VIEW view_2_tab4_815

statement ok
DROP VIEW view_3_tab4_815

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_816 AS SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 404 AND 372

statement ok
CREATE VIEW view_2_tab0_816 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 404 AND 372)

statement ok
CREATE VIEW view_3_tab0_816 AS SELECT pk FROM view_1_tab0_816

query II rowsort label-1600-1
SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 404 AND 372
----

query II rowsort label-1600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 404 AND 372)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab0_816
----

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab0_816
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 404 AND 372 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 404 AND 372)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_816 UNION ALL SELECT pk, col0 FROM view_2_tab0_816
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 404 AND 372 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 404 AND 372)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_816 UNION SELECT pk, col0 FROM view_2_tab0_816
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 404 AND 372 ) AS tab0_816
----

query I rowsort label-1600-3
SELECT * FROM view_3_tab0_816
----

query I rowsort label-1600-3
SELECT pk FROM tab0 WHERE col0 BETWEEN 404 AND 372
----

statement ok
DROP VIEW view_1_tab0_816

statement ok
DROP VIEW view_2_tab0_816

statement ok
DROP VIEW view_3_tab0_816

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_816 AS SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 404 AND 372

statement ok
CREATE VIEW view_2_tab1_816 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 404 AND 372)

statement ok
CREATE VIEW view_3_tab1_816 AS SELECT pk FROM view_1_tab1_816

query II rowsort label-1600-1
SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 404 AND 372
----

query II rowsort label-1600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 404 AND 372)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab1_816
----

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab1_816
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 404 AND 372 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 404 AND 372)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_816 UNION ALL SELECT pk, col0 FROM view_2_tab1_816
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 404 AND 372 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 404 AND 372)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_816 UNION SELECT pk, col0 FROM view_2_tab1_816
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 404 AND 372 ) AS tab1_816
----

query I rowsort label-1600-3
SELECT * FROM view_3_tab1_816
----

query I rowsort label-1600-3
SELECT pk FROM tab1 WHERE col0 BETWEEN 404 AND 372
----

statement ok
DROP VIEW view_1_tab1_816

statement ok
DROP VIEW view_2_tab1_816

statement ok
DROP VIEW view_3_tab1_816

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_816 AS SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 404 AND 372

statement ok
CREATE VIEW view_2_tab2_816 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 404 AND 372)

statement ok
CREATE VIEW view_3_tab2_816 AS SELECT pk FROM view_1_tab2_816

query II rowsort label-1600-1
SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 404 AND 372
----

query II rowsort label-1600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 404 AND 372)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab2_816
----

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab2_816
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 404 AND 372 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 404 AND 372)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_816 UNION ALL SELECT pk, col0 FROM view_2_tab2_816
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 404 AND 372 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 404 AND 372)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_816 UNION SELECT pk, col0 FROM view_2_tab2_816
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 404 AND 372 ) AS tab2_816
----

query I rowsort label-1600-3
SELECT * FROM view_3_tab2_816
----

query I rowsort label-1600-3
SELECT pk FROM tab2 WHERE col0 BETWEEN 404 AND 372
----

statement ok
DROP VIEW view_1_tab2_816

statement ok
DROP VIEW view_2_tab2_816

statement ok
DROP VIEW view_3_tab2_816

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_816 AS SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 404 AND 372

statement ok
CREATE VIEW view_2_tab3_816 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 404 AND 372)

statement ok
CREATE VIEW view_3_tab3_816 AS SELECT pk FROM view_1_tab3_816

query II rowsort label-1600-1
SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 404 AND 372
----

query II rowsort label-1600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 404 AND 372)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab3_816
----

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab3_816
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 404 AND 372 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 404 AND 372)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_816 UNION ALL SELECT pk, col0 FROM view_2_tab3_816
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 404 AND 372 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 404 AND 372)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_816 UNION SELECT pk, col0 FROM view_2_tab3_816
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 404 AND 372 ) AS tab3_816
----

query I rowsort label-1600-3
SELECT * FROM view_3_tab3_816
----

query I rowsort label-1600-3
SELECT pk FROM tab3 WHERE col0 BETWEEN 404 AND 372
----

statement ok
DROP VIEW view_1_tab3_816

statement ok
DROP VIEW view_2_tab3_816

statement ok
DROP VIEW view_3_tab3_816

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_816 AS SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 404 AND 372

statement ok
CREATE VIEW view_2_tab4_816 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 404 AND 372)

statement ok
CREATE VIEW view_3_tab4_816 AS SELECT pk FROM view_1_tab4_816

query II rowsort label-1600-1
SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 404 AND 372
----

query II rowsort label-1600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 404 AND 372)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab4_816
----

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab4_816
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 404 AND 372 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 404 AND 372)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_816 UNION ALL SELECT pk, col0 FROM view_2_tab4_816
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 404 AND 372 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 404 AND 372)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_816 UNION SELECT pk, col0 FROM view_2_tab4_816
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 404 AND 372 ) AS tab4_816
----

query I rowsort label-1600-3
SELECT * FROM view_3_tab4_816
----

query I rowsort label-1600-3
SELECT pk FROM tab4 WHERE col0 BETWEEN 404 AND 372
----

statement ok
DROP VIEW view_1_tab4_816

statement ok
DROP VIEW view_2_tab4_816

statement ok
DROP VIEW view_3_tab4_816

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_817 AS SELECT pk, col0 FROM tab0 WHERE col4 > 933.53

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

statement ok
CREATE VIEW view_3_tab0_817 AS SELECT pk FROM view_1_tab0_817

query II rowsort label-1700-1
SELECT pk, col0 FROM tab0 WHERE col4 > 933.53
----
14 values hashing to e88b329b13dd85e3d78e9433b4495494

query II rowsort label-1700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 933.53)
----
186 values hashing to db91ab163d4f297bfbd73e435b989943

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab0_817
----
14 values hashing to e88b329b13dd85e3d78e9433b4495494

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab0_817
----
186 values hashing to db91ab163d4f297bfbd73e435b989943

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 933.53 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 933.53)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_817 UNION ALL SELECT pk, col0 FROM view_2_tab0_817
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 933.53 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 933.53)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_817 UNION SELECT pk, col0 FROM view_2_tab0_817
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 > 933.53 ) AS tab0_817
----
23
34
36
67
68
8
91

query I rowsort label-1700-3
SELECT * FROM view_3_tab0_817
----
23
34
36
67
68
8
91

query I rowsort label-1700-3
SELECT pk FROM tab0 WHERE col4 > 933.53
----
23
34
36
67
68
8
91

statement ok
DROP VIEW view_1_tab0_817

statement ok
DROP VIEW view_2_tab0_817

statement ok
DROP VIEW view_3_tab0_817

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_817 AS SELECT pk, col0 FROM tab1 WHERE col4 > 933.53

statement ok
CREATE VIEW view_2_tab1_817 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 933.53)

statement ok
CREATE VIEW view_3_tab1_817 AS SELECT pk FROM view_1_tab1_817

query II rowsort label-1700-1
SELECT pk, col0 FROM tab1 WHERE col4 > 933.53
----
14 values hashing to e88b329b13dd85e3d78e9433b4495494

query II rowsort label-1700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 933.53)
----
186 values hashing to db91ab163d4f297bfbd73e435b989943

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab1_817
----
14 values hashing to e88b329b13dd85e3d78e9433b4495494

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab1_817
----
186 values hashing to db91ab163d4f297bfbd73e435b989943

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 933.53 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 933.53)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_817 UNION ALL SELECT pk, col0 FROM view_2_tab1_817
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 933.53 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 933.53)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_817 UNION SELECT pk, col0 FROM view_2_tab1_817
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 > 933.53 ) AS tab1_817
----
23
34
36
67
68
8
91

query I rowsort label-1700-3
SELECT * FROM view_3_tab1_817
----
23
34
36
67
68
8
91

query I rowsort label-1700-3
SELECT pk FROM tab1 WHERE col4 > 933.53
----
23
34
36
67
68
8
91

statement ok
DROP VIEW view_1_tab1_817

statement ok
DROP VIEW view_2_tab1_817

statement ok
DROP VIEW view_3_tab1_817

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_817 AS SELECT pk, col0 FROM tab2 WHERE col4 > 933.53

statement ok
CREATE VIEW view_2_tab2_817 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 933.53)

statement ok
CREATE VIEW view_3_tab2_817 AS SELECT pk FROM view_1_tab2_817

query II rowsort label-1700-1
SELECT pk, col0 FROM tab2 WHERE col4 > 933.53
----
14 values hashing to e88b329b13dd85e3d78e9433b4495494

query II rowsort label-1700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 933.53)
----
186 values hashing to db91ab163d4f297bfbd73e435b989943

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab2_817
----
14 values hashing to e88b329b13dd85e3d78e9433b4495494

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab2_817
----
186 values hashing to db91ab163d4f297bfbd73e435b989943

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 933.53 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 933.53)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_817 UNION ALL SELECT pk, col0 FROM view_2_tab2_817
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 933.53 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 933.53)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_817 UNION SELECT pk, col0 FROM view_2_tab2_817
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 > 933.53 ) AS tab2_817
----
23
34
36
67
68
8
91

query I rowsort label-1700-3
SELECT * FROM view_3_tab2_817
----
23
34
36
67
68
8
91

query I rowsort label-1700-3
SELECT pk FROM tab2 WHERE col4 > 933.53
----
23
34
36
67
68
8
91

statement ok
DROP VIEW view_1_tab2_817

statement ok
DROP VIEW view_2_tab2_817

statement ok
DROP VIEW view_3_tab2_817

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_817 AS SELECT pk, col0 FROM tab3 WHERE col4 > 933.53

statement ok
CREATE VIEW view_2_tab3_817 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 933.53)

statement ok
CREATE VIEW view_3_tab3_817 AS SELECT pk FROM view_1_tab3_817

query II rowsort label-1700-1
SELECT pk, col0 FROM tab3 WHERE col4 > 933.53
----
14 values hashing to e88b329b13dd85e3d78e9433b4495494

query II rowsort label-1700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 933.53)
----
186 values hashing to db91ab163d4f297bfbd73e435b989943

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab3_817
----
14 values hashing to e88b329b13dd85e3d78e9433b4495494

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab3_817
----
186 values hashing to db91ab163d4f297bfbd73e435b989943

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 933.53 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 933.53)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_817 UNION ALL SELECT pk, col0 FROM view_2_tab3_817
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 933.53 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 933.53)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_817 UNION SELECT pk, col0 FROM view_2_tab3_817
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 > 933.53 ) AS tab3_817
----
23
34
36
67
68
8
91

query I rowsort label-1700-3
SELECT * FROM view_3_tab3_817
----
23
34
36
67
68
8
91

query I rowsort label-1700-3
SELECT pk FROM tab3 WHERE col4 > 933.53
----
23
34
36
67
68
8
91

statement ok
DROP VIEW view_1_tab3_817

statement ok
DROP VIEW view_2_tab3_817

statement ok
DROP VIEW view_3_tab3_817

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_817 AS SELECT pk, col0 FROM tab4 WHERE col4 > 933.53

statement ok
CREATE VIEW view_2_tab4_817 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 933.53)

statement ok
CREATE VIEW view_3_tab4_817 AS SELECT pk FROM view_1_tab4_817

query II rowsort label-1700-1
SELECT pk, col0 FROM tab4 WHERE col4 > 933.53
----
14 values hashing to e88b329b13dd85e3d78e9433b4495494

query II rowsort label-1700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 933.53)
----
186 values hashing to db91ab163d4f297bfbd73e435b989943

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab4_817
----
14 values hashing to e88b329b13dd85e3d78e9433b4495494

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab4_817
----
186 values hashing to db91ab163d4f297bfbd73e435b989943

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 933.53 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 933.53)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_817 UNION ALL SELECT pk, col0 FROM view_2_tab4_817
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 933.53 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 933.53)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_817 UNION SELECT pk, col0 FROM view_2_tab4_817
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 > 933.53 ) AS tab4_817
----
23
34
36
67
68
8
91

query I rowsort label-1700-3
SELECT * FROM view_3_tab4_817
----
23
34
36
67
68
8
91

query I rowsort label-1700-3
SELECT pk FROM tab4 WHERE col4 > 933.53
----
23
34
36
67
68
8
91

statement ok
DROP VIEW view_1_tab4_817

statement ok
DROP VIEW view_2_tab4_817

statement ok
DROP VIEW view_3_tab4_817

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_818 AS SELECT pk, col0 FROM tab0 WHERE col0 < 283

statement ok
CREATE VIEW view_2_tab0_818 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 283)

statement ok
CREATE VIEW view_3_tab0_818 AS SELECT pk FROM view_1_tab0_818

query II rowsort label-1800-1
SELECT pk, col0 FROM tab0 WHERE col0 < 283
----
48 values hashing to 8912c5402e081d7d52dd1a4b2e8ce178

query II rowsort label-1800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 283)
----
152 values hashing to f68f0c49ab78e261fa28bc00e145b769

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab0_818
----
48 values hashing to 8912c5402e081d7d52dd1a4b2e8ce178

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab0_818
----
152 values hashing to f68f0c49ab78e261fa28bc00e145b769

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 283 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 283)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_818 UNION ALL SELECT pk, col0 FROM view_2_tab0_818
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 283 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 283)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_818 UNION SELECT pk, col0 FROM view_2_tab0_818
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 283 ) AS tab0_818
----
24 values hashing to acd4eb5f094fbac871bcf91fac9fc673

query I rowsort label-1800-3
SELECT * FROM view_3_tab0_818
----
24 values hashing to acd4eb5f094fbac871bcf91fac9fc673

query I rowsort label-1800-3
SELECT pk FROM tab0 WHERE col0 < 283
----
24 values hashing to acd4eb5f094fbac871bcf91fac9fc673

statement ok
DROP VIEW view_1_tab0_818

statement ok
DROP VIEW view_2_tab0_818

statement ok
DROP VIEW view_3_tab0_818

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_818 AS SELECT pk, col0 FROM tab1 WHERE col0 < 283

statement ok
CREATE VIEW view_2_tab1_818 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 283)

statement ok
CREATE VIEW view_3_tab1_818 AS SELECT pk FROM view_1_tab1_818

query II rowsort label-1800-1
SELECT pk, col0 FROM tab1 WHERE col0 < 283
----
48 values hashing to 8912c5402e081d7d52dd1a4b2e8ce178

query II rowsort label-1800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 283)
----
152 values hashing to f68f0c49ab78e261fa28bc00e145b769

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab1_818
----
48 values hashing to 8912c5402e081d7d52dd1a4b2e8ce178

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab1_818
----
152 values hashing to f68f0c49ab78e261fa28bc00e145b769

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 283 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 283)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_818 UNION ALL SELECT pk, col0 FROM view_2_tab1_818
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 283 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 283)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_818 UNION SELECT pk, col0 FROM view_2_tab1_818
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 283 ) AS tab1_818
----
24 values hashing to acd4eb5f094fbac871bcf91fac9fc673

query I rowsort label-1800-3
SELECT * FROM view_3_tab1_818
----
24 values hashing to acd4eb5f094fbac871bcf91fac9fc673

query I rowsort label-1800-3
SELECT pk FROM tab1 WHERE col0 < 283
----
24 values hashing to acd4eb5f094fbac871bcf91fac9fc673

statement ok
DROP VIEW view_1_tab1_818

statement ok
DROP VIEW view_2_tab1_818

statement ok
DROP VIEW view_3_tab1_818

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_818 AS SELECT pk, col0 FROM tab2 WHERE col0 < 283

statement ok
CREATE VIEW view_2_tab2_818 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 283)

statement ok
CREATE VIEW view_3_tab2_818 AS SELECT pk FROM view_1_tab2_818

query II rowsort label-1800-1
SELECT pk, col0 FROM tab2 WHERE col0 < 283
----
48 values hashing to 8912c5402e081d7d52dd1a4b2e8ce178

query II rowsort label-1800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 283)
----
152 values hashing to f68f0c49ab78e261fa28bc00e145b769

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab2_818
----
48 values hashing to 8912c5402e081d7d52dd1a4b2e8ce178

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab2_818
----
152 values hashing to f68f0c49ab78e261fa28bc00e145b769

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 283 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 283)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_818 UNION ALL SELECT pk, col0 FROM view_2_tab2_818
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 283 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 283)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_818 UNION SELECT pk, col0 FROM view_2_tab2_818
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 283 ) AS tab2_818
----
24 values hashing to acd4eb5f094fbac871bcf91fac9fc673

query I rowsort label-1800-3
SELECT * FROM view_3_tab2_818
----
24 values hashing to acd4eb5f094fbac871bcf91fac9fc673

query I rowsort label-1800-3
SELECT pk FROM tab2 WHERE col0 < 283
----
24 values hashing to acd4eb5f094fbac871bcf91fac9fc673

statement ok
DROP VIEW view_1_tab2_818

statement ok
DROP VIEW view_2_tab2_818

statement ok
DROP VIEW view_3_tab2_818

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_818 AS SELECT pk, col0 FROM tab3 WHERE col0 < 283

statement ok
CREATE VIEW view_2_tab3_818 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 283)

statement ok
CREATE VIEW view_3_tab3_818 AS SELECT pk FROM view_1_tab3_818

query II rowsort label-1800-1
SELECT pk, col0 FROM tab3 WHERE col0 < 283
----
48 values hashing to 8912c5402e081d7d52dd1a4b2e8ce178

query II rowsort label-1800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 283)
----
152 values hashing to f68f0c49ab78e261fa28bc00e145b769

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab3_818
----
48 values hashing to 8912c5402e081d7d52dd1a4b2e8ce178

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab3_818
----
152 values hashing to f68f0c49ab78e261fa28bc00e145b769

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 283 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 283)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_818 UNION ALL SELECT pk, col0 FROM view_2_tab3_818
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 283 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 283)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_818 UNION SELECT pk, col0 FROM view_2_tab3_818
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 283 ) AS tab3_818
----
24 values hashing to acd4eb5f094fbac871bcf91fac9fc673

query I rowsort label-1800-3
SELECT * FROM view_3_tab3_818
----
24 values hashing to acd4eb5f094fbac871bcf91fac9fc673

query I rowsort label-1800-3
SELECT pk FROM tab3 WHERE col0 < 283
----
24 values hashing to acd4eb5f094fbac871bcf91fac9fc673

statement ok
DROP VIEW view_1_tab3_818

statement ok
DROP VIEW view_2_tab3_818

statement ok
DROP VIEW view_3_tab3_818

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_818 AS SELECT pk, col0 FROM tab4 WHERE col0 < 283

statement ok
CREATE VIEW view_2_tab4_818 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 283)

statement ok
CREATE VIEW view_3_tab4_818 AS SELECT pk FROM view_1_tab4_818

query II rowsort label-1800-1
SELECT pk, col0 FROM tab4 WHERE col0 < 283
----
48 values hashing to 8912c5402e081d7d52dd1a4b2e8ce178

query II rowsort label-1800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 283)
----
152 values hashing to f68f0c49ab78e261fa28bc00e145b769

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab4_818
----
48 values hashing to 8912c5402e081d7d52dd1a4b2e8ce178

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab4_818
----
152 values hashing to f68f0c49ab78e261fa28bc00e145b769

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 283 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 283)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_818 UNION ALL SELECT pk, col0 FROM view_2_tab4_818
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 283 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 283)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_818 UNION SELECT pk, col0 FROM view_2_tab4_818
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 283 ) AS tab4_818
----
24 values hashing to acd4eb5f094fbac871bcf91fac9fc673

query I rowsort label-1800-3
SELECT * FROM view_3_tab4_818
----
24 values hashing to acd4eb5f094fbac871bcf91fac9fc673

query I rowsort label-1800-3
SELECT pk FROM tab4 WHERE col0 < 283
----
24 values hashing to acd4eb5f094fbac871bcf91fac9fc673

statement ok
DROP VIEW view_1_tab4_818

statement ok
DROP VIEW view_2_tab4_818

statement ok
DROP VIEW view_3_tab4_818

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_819 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920))

statement ok
CREATE VIEW view_2_tab0_819 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))

statement ok
CREATE VIEW view_3_tab0_819 AS SELECT pk FROM view_1_tab0_819

query II rowsort label-1900-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920))
----
106 values hashing to 79b1acdbfb092b88dff3817232681b76

query II rowsort label-1900-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))
----
94 values hashing to 5d357f9d579acd6c48f587a35ce6c5a0

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab0_819
----
106 values hashing to 79b1acdbfb092b88dff3817232681b76

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab0_819
----
94 values hashing to 5d357f9d579acd6c48f587a35ce6c5a0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_819 UNION ALL SELECT pk, col0 FROM view_2_tab0_819
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_819 UNION SELECT pk, col0 FROM view_2_tab0_819
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)) ) AS tab0_819
----
53 values hashing to 39b80419a883293fdb478a649151dbc7

query I rowsort label-1900-3
SELECT * FROM view_3_tab0_819
----
53 values hashing to 39b80419a883293fdb478a649151dbc7

query I rowsort label-1900-3
SELECT pk FROM tab0 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920))
----
53 values hashing to 39b80419a883293fdb478a649151dbc7

statement ok
DROP VIEW view_1_tab0_819

statement ok
DROP VIEW view_2_tab0_819

statement ok
DROP VIEW view_3_tab0_819

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_819 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920))

statement ok
CREATE VIEW view_2_tab1_819 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))

statement ok
CREATE VIEW view_3_tab1_819 AS SELECT pk FROM view_1_tab1_819

query II rowsort label-1900-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920))
----
106 values hashing to 79b1acdbfb092b88dff3817232681b76

query II rowsort label-1900-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))
----
94 values hashing to 5d357f9d579acd6c48f587a35ce6c5a0

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab1_819
----
106 values hashing to 79b1acdbfb092b88dff3817232681b76

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab1_819
----
94 values hashing to 5d357f9d579acd6c48f587a35ce6c5a0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_819 UNION ALL SELECT pk, col0 FROM view_2_tab1_819
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_819 UNION SELECT pk, col0 FROM view_2_tab1_819
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)) ) AS tab1_819
----
53 values hashing to 39b80419a883293fdb478a649151dbc7

query I rowsort label-1900-3
SELECT * FROM view_3_tab1_819
----
53 values hashing to 39b80419a883293fdb478a649151dbc7

query I rowsort label-1900-3
SELECT pk FROM tab1 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920))
----
53 values hashing to 39b80419a883293fdb478a649151dbc7

statement ok
DROP VIEW view_1_tab1_819

statement ok
DROP VIEW view_2_tab1_819

statement ok
DROP VIEW view_3_tab1_819

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_819 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920))

statement ok
CREATE VIEW view_2_tab2_819 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))

statement ok
CREATE VIEW view_3_tab2_819 AS SELECT pk FROM view_1_tab2_819

query II rowsort label-1900-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920))
----
106 values hashing to 79b1acdbfb092b88dff3817232681b76

query II rowsort label-1900-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))
----
94 values hashing to 5d357f9d579acd6c48f587a35ce6c5a0

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab2_819
----
106 values hashing to 79b1acdbfb092b88dff3817232681b76

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab2_819
----
94 values hashing to 5d357f9d579acd6c48f587a35ce6c5a0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_819 UNION ALL SELECT pk, col0 FROM view_2_tab2_819
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_819 UNION SELECT pk, col0 FROM view_2_tab2_819
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)) ) AS tab2_819
----
53 values hashing to 39b80419a883293fdb478a649151dbc7

query I rowsort label-1900-3
SELECT * FROM view_3_tab2_819
----
53 values hashing to 39b80419a883293fdb478a649151dbc7

query I rowsort label-1900-3
SELECT pk FROM tab2 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920))
----
53 values hashing to 39b80419a883293fdb478a649151dbc7

statement ok
DROP VIEW view_1_tab2_819

statement ok
DROP VIEW view_2_tab2_819

statement ok
DROP VIEW view_3_tab2_819

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_819 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920))

statement ok
CREATE VIEW view_2_tab3_819 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))

statement ok
CREATE VIEW view_3_tab3_819 AS SELECT pk FROM view_1_tab3_819

query II rowsort label-1900-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920))
----
106 values hashing to 79b1acdbfb092b88dff3817232681b76

query II rowsort label-1900-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))
----
94 values hashing to 5d357f9d579acd6c48f587a35ce6c5a0

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab3_819
----
106 values hashing to 79b1acdbfb092b88dff3817232681b76

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab3_819
----
94 values hashing to 5d357f9d579acd6c48f587a35ce6c5a0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_819 UNION ALL SELECT pk, col0 FROM view_2_tab3_819
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_819 UNION SELECT pk, col0 FROM view_2_tab3_819
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)) ) AS tab3_819
----
53 values hashing to 39b80419a883293fdb478a649151dbc7

query I rowsort label-1900-3
SELECT * FROM view_3_tab3_819
----
53 values hashing to 39b80419a883293fdb478a649151dbc7

query I rowsort label-1900-3
SELECT pk FROM tab3 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920))
----
53 values hashing to 39b80419a883293fdb478a649151dbc7

statement ok
DROP VIEW view_1_tab3_819

statement ok
DROP VIEW view_2_tab3_819

statement ok
DROP VIEW view_3_tab3_819

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_819 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920))

statement ok
CREATE VIEW view_2_tab4_819 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))

statement ok
CREATE VIEW view_3_tab4_819 AS SELECT pk FROM view_1_tab4_819

query II rowsort label-1900-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920))
----
106 values hashing to 79b1acdbfb092b88dff3817232681b76

query II rowsort label-1900-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))
----
94 values hashing to 5d357f9d579acd6c48f587a35ce6c5a0

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab4_819
----
106 values hashing to 79b1acdbfb092b88dff3817232681b76

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab4_819
----
94 values hashing to 5d357f9d579acd6c48f587a35ce6c5a0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_819 UNION ALL SELECT pk, col0 FROM view_2_tab4_819
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_819 UNION SELECT pk, col0 FROM view_2_tab4_819
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920)) ) AS tab4_819
----
53 values hashing to 39b80419a883293fdb478a649151dbc7

query I rowsort label-1900-3
SELECT * FROM view_3_tab4_819
----
53 values hashing to 39b80419a883293fdb478a649151dbc7

query I rowsort label-1900-3
SELECT pk FROM tab4 WHERE (col0 < 774) AND col3 >= 398 OR col3 IS NULL AND col0 > 844 OR (col0 IS NULL) AND ((col0 <= 145 AND col4 < 866.81 AND col3 < 699 AND col3 IN (916,245,380,504,352,231)) OR col3 BETWEEN 398 AND 291 OR col0 = 854 OR col3 < 830) AND col0 > 617 OR col3 > 759 AND (col0 >= 839 OR (col3 <= 920))
----
53 values hashing to 39b80419a883293fdb478a649151dbc7

statement ok
DROP VIEW view_1_tab4_819

statement ok
DROP VIEW view_2_tab4_819

statement ok
DROP VIEW view_3_tab4_819

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_820 AS SELECT pk, col0 FROM tab0 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6)

statement ok
CREATE VIEW view_2_tab0_820 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))

statement ok
CREATE VIEW view_3_tab0_820 AS SELECT pk FROM view_1_tab0_820

query II rowsort label-2000-1
SELECT pk, col0 FROM tab0 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6)
----
32 values hashing to 086529f8674f565c77424a9ec1877aac

query II rowsort label-2000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))
----
168 values hashing to 86d38c2c776af5ace5b32e3aa21624af

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab0_820
----
32 values hashing to 086529f8674f565c77424a9ec1877aac

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab0_820
----
168 values hashing to 86d38c2c776af5ace5b32e3aa21624af

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_820 UNION ALL SELECT pk, col0 FROM view_2_tab0_820
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_820 UNION SELECT pk, col0 FROM view_2_tab0_820
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6) ) AS tab0_820
----
16 values hashing to 169250f5cee130b887c1b14effaa42ae

query I rowsort label-2000-3
SELECT * FROM view_3_tab0_820
----
16 values hashing to 169250f5cee130b887c1b14effaa42ae

query I rowsort label-2000-3
SELECT pk FROM tab0 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6)
----
16 values hashing to 169250f5cee130b887c1b14effaa42ae

statement ok
DROP VIEW view_1_tab0_820

statement ok
DROP VIEW view_2_tab0_820

statement ok
DROP VIEW view_3_tab0_820

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_820 AS SELECT pk, col0 FROM tab1 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6)

statement ok
CREATE VIEW view_2_tab1_820 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))

statement ok
CREATE VIEW view_3_tab1_820 AS SELECT pk FROM view_1_tab1_820

query II rowsort label-2000-1
SELECT pk, col0 FROM tab1 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6)
----
32 values hashing to 086529f8674f565c77424a9ec1877aac

query II rowsort label-2000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))
----
168 values hashing to 86d38c2c776af5ace5b32e3aa21624af

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab1_820
----
32 values hashing to 086529f8674f565c77424a9ec1877aac

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab1_820
----
168 values hashing to 86d38c2c776af5ace5b32e3aa21624af

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_820 UNION ALL SELECT pk, col0 FROM view_2_tab1_820
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_820 UNION SELECT pk, col0 FROM view_2_tab1_820
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6) ) AS tab1_820
----
16 values hashing to 169250f5cee130b887c1b14effaa42ae

query I rowsort label-2000-3
SELECT * FROM view_3_tab1_820
----
16 values hashing to 169250f5cee130b887c1b14effaa42ae

query I rowsort label-2000-3
SELECT pk FROM tab1 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6)
----
16 values hashing to 169250f5cee130b887c1b14effaa42ae

statement ok
DROP VIEW view_1_tab1_820

statement ok
DROP VIEW view_2_tab1_820

statement ok
DROP VIEW view_3_tab1_820

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_820 AS SELECT pk, col0 FROM tab2 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6)

statement ok
CREATE VIEW view_2_tab2_820 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))

statement ok
CREATE VIEW view_3_tab2_820 AS SELECT pk FROM view_1_tab2_820

query II rowsort label-2000-1
SELECT pk, col0 FROM tab2 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6)
----
32 values hashing to 086529f8674f565c77424a9ec1877aac

query II rowsort label-2000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))
----
168 values hashing to 86d38c2c776af5ace5b32e3aa21624af

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab2_820
----
32 values hashing to 086529f8674f565c77424a9ec1877aac

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab2_820
----
168 values hashing to 86d38c2c776af5ace5b32e3aa21624af

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_820 UNION ALL SELECT pk, col0 FROM view_2_tab2_820
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_820 UNION SELECT pk, col0 FROM view_2_tab2_820
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6) ) AS tab2_820
----
16 values hashing to 169250f5cee130b887c1b14effaa42ae

query I rowsort label-2000-3
SELECT * FROM view_3_tab2_820
----
16 values hashing to 169250f5cee130b887c1b14effaa42ae

query I rowsort label-2000-3
SELECT pk FROM tab2 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6)
----
16 values hashing to 169250f5cee130b887c1b14effaa42ae

statement ok
DROP VIEW view_1_tab2_820

statement ok
DROP VIEW view_2_tab2_820

statement ok
DROP VIEW view_3_tab2_820

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_820 AS SELECT pk, col0 FROM tab3 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6)

statement ok
CREATE VIEW view_2_tab3_820 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))

statement ok
CREATE VIEW view_3_tab3_820 AS SELECT pk FROM view_1_tab3_820

query II rowsort label-2000-1
SELECT pk, col0 FROM tab3 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6)
----
32 values hashing to 086529f8674f565c77424a9ec1877aac

query II rowsort label-2000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))
----
168 values hashing to 86d38c2c776af5ace5b32e3aa21624af

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab3_820
----
32 values hashing to 086529f8674f565c77424a9ec1877aac

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab3_820
----
168 values hashing to 86d38c2c776af5ace5b32e3aa21624af

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_820 UNION ALL SELECT pk, col0 FROM view_2_tab3_820
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_820 UNION SELECT pk, col0 FROM view_2_tab3_820
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6) ) AS tab3_820
----
16 values hashing to 169250f5cee130b887c1b14effaa42ae

query I rowsort label-2000-3
SELECT * FROM view_3_tab3_820
----
16 values hashing to 169250f5cee130b887c1b14effaa42ae

query I rowsort label-2000-3
SELECT pk FROM tab3 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6)
----
16 values hashing to 169250f5cee130b887c1b14effaa42ae

statement ok
DROP VIEW view_1_tab3_820

statement ok
DROP VIEW view_2_tab3_820

statement ok
DROP VIEW view_3_tab3_820

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_820 AS SELECT pk, col0 FROM tab4 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6)

statement ok
CREATE VIEW view_2_tab4_820 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))

statement ok
CREATE VIEW view_3_tab4_820 AS SELECT pk FROM view_1_tab4_820

query II rowsort label-2000-1
SELECT pk, col0 FROM tab4 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6)
----
32 values hashing to 086529f8674f565c77424a9ec1877aac

query II rowsort label-2000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))
----
168 values hashing to 86d38c2c776af5ace5b32e3aa21624af

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab4_820
----
32 values hashing to 086529f8674f565c77424a9ec1877aac

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab4_820
----
168 values hashing to 86d38c2c776af5ace5b32e3aa21624af

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_820 UNION ALL SELECT pk, col0 FROM view_2_tab4_820
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_820 UNION SELECT pk, col0 FROM view_2_tab4_820
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6) ) AS tab4_820
----
16 values hashing to 169250f5cee130b887c1b14effaa42ae

query I rowsort label-2000-3
SELECT * FROM view_3_tab4_820
----
16 values hashing to 169250f5cee130b887c1b14effaa42ae

query I rowsort label-2000-3
SELECT pk FROM tab4 WHERE col3 < 234 AND ((col3 >= 356) AND col4 > 37.42 OR (col1 > 221.55) OR col4 > 828.6)
----
16 values hashing to 169250f5cee130b887c1b14effaa42ae

statement ok
DROP VIEW view_1_tab4_820

statement ok
DROP VIEW view_2_tab4_820

statement ok
DROP VIEW view_3_tab4_820

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_821 AS SELECT pk, col0 FROM tab0 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323)

statement ok
CREATE VIEW view_2_tab0_821 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))

statement ok
CREATE VIEW view_3_tab0_821 AS SELECT pk FROM view_1_tab0_821

query II rowsort label-2100-1
SELECT pk, col0 FROM tab0 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323)
----
44 values hashing to 929d24c9602f53cdade7db4de5b1de8b

query II rowsort label-2100-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))
----
156 values hashing to 3c29ce43b4bad1f7eac6b3b27386505a

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab0_821
----
44 values hashing to 929d24c9602f53cdade7db4de5b1de8b

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab0_821
----
156 values hashing to 3c29ce43b4bad1f7eac6b3b27386505a

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_821 UNION ALL SELECT pk, col0 FROM view_2_tab0_821
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_821 UNION SELECT pk, col0 FROM view_2_tab0_821
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323) ) AS tab0_821
----
22 values hashing to fa560d564065cba63efa2c98c96dd927

query I rowsort label-2100-3
SELECT * FROM view_3_tab0_821
----
22 values hashing to fa560d564065cba63efa2c98c96dd927

query I rowsort label-2100-3
SELECT pk FROM tab0 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323)
----
22 values hashing to fa560d564065cba63efa2c98c96dd927

statement ok
DROP VIEW view_1_tab0_821

statement ok
DROP VIEW view_2_tab0_821

statement ok
DROP VIEW view_3_tab0_821

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_821 AS SELECT pk, col0 FROM tab1 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323)

statement ok
CREATE VIEW view_2_tab1_821 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))

statement ok
CREATE VIEW view_3_tab1_821 AS SELECT pk FROM view_1_tab1_821

query II rowsort label-2100-1
SELECT pk, col0 FROM tab1 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323)
----
44 values hashing to 929d24c9602f53cdade7db4de5b1de8b

query II rowsort label-2100-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))
----
156 values hashing to 3c29ce43b4bad1f7eac6b3b27386505a

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab1_821
----
44 values hashing to 929d24c9602f53cdade7db4de5b1de8b

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab1_821
----
156 values hashing to 3c29ce43b4bad1f7eac6b3b27386505a

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_821 UNION ALL SELECT pk, col0 FROM view_2_tab1_821
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_821 UNION SELECT pk, col0 FROM view_2_tab1_821
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323) ) AS tab1_821
----
22 values hashing to fa560d564065cba63efa2c98c96dd927

query I rowsort label-2100-3
SELECT * FROM view_3_tab1_821
----
22 values hashing to fa560d564065cba63efa2c98c96dd927

query I rowsort label-2100-3
SELECT pk FROM tab1 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323)
----
22 values hashing to fa560d564065cba63efa2c98c96dd927

statement ok
DROP VIEW view_1_tab1_821

statement ok
DROP VIEW view_2_tab1_821

statement ok
DROP VIEW view_3_tab1_821

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_821 AS SELECT pk, col0 FROM tab2 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323)

statement ok
CREATE VIEW view_2_tab2_821 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))

statement ok
CREATE VIEW view_3_tab2_821 AS SELECT pk FROM view_1_tab2_821

query II rowsort label-2100-1
SELECT pk, col0 FROM tab2 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323)
----
44 values hashing to 929d24c9602f53cdade7db4de5b1de8b

query II rowsort label-2100-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))
----
156 values hashing to 3c29ce43b4bad1f7eac6b3b27386505a

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab2_821
----
44 values hashing to 929d24c9602f53cdade7db4de5b1de8b

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab2_821
----
156 values hashing to 3c29ce43b4bad1f7eac6b3b27386505a

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_821 UNION ALL SELECT pk, col0 FROM view_2_tab2_821
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_821 UNION SELECT pk, col0 FROM view_2_tab2_821
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323) ) AS tab2_821
----
22 values hashing to fa560d564065cba63efa2c98c96dd927

query I rowsort label-2100-3
SELECT * FROM view_3_tab2_821
----
22 values hashing to fa560d564065cba63efa2c98c96dd927

query I rowsort label-2100-3
SELECT pk FROM tab2 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323)
----
22 values hashing to fa560d564065cba63efa2c98c96dd927

statement ok
DROP VIEW view_1_tab2_821

statement ok
DROP VIEW view_2_tab2_821

statement ok
DROP VIEW view_3_tab2_821

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_821 AS SELECT pk, col0 FROM tab3 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323)

statement ok
CREATE VIEW view_2_tab3_821 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))

statement ok
CREATE VIEW view_3_tab3_821 AS SELECT pk FROM view_1_tab3_821

query II rowsort label-2100-1
SELECT pk, col0 FROM tab3 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323)
----
44 values hashing to 929d24c9602f53cdade7db4de5b1de8b

query II rowsort label-2100-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))
----
156 values hashing to 3c29ce43b4bad1f7eac6b3b27386505a

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab3_821
----
44 values hashing to 929d24c9602f53cdade7db4de5b1de8b

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab3_821
----
156 values hashing to 3c29ce43b4bad1f7eac6b3b27386505a

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_821 UNION ALL SELECT pk, col0 FROM view_2_tab3_821
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_821 UNION SELECT pk, col0 FROM view_2_tab3_821
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323) ) AS tab3_821
----
22 values hashing to fa560d564065cba63efa2c98c96dd927

query I rowsort label-2100-3
SELECT * FROM view_3_tab3_821
----
22 values hashing to fa560d564065cba63efa2c98c96dd927

query I rowsort label-2100-3
SELECT pk FROM tab3 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323)
----
22 values hashing to fa560d564065cba63efa2c98c96dd927

statement ok
DROP VIEW view_1_tab3_821

statement ok
DROP VIEW view_2_tab3_821

statement ok
DROP VIEW view_3_tab3_821

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_821 AS SELECT pk, col0 FROM tab4 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323)

statement ok
CREATE VIEW view_2_tab4_821 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))

statement ok
CREATE VIEW view_3_tab4_821 AS SELECT pk FROM view_1_tab4_821

query II rowsort label-2100-1
SELECT pk, col0 FROM tab4 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323)
----
44 values hashing to 929d24c9602f53cdade7db4de5b1de8b

query II rowsort label-2100-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))
----
156 values hashing to 3c29ce43b4bad1f7eac6b3b27386505a

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab4_821
----
44 values hashing to 929d24c9602f53cdade7db4de5b1de8b

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab4_821
----
156 values hashing to 3c29ce43b4bad1f7eac6b3b27386505a

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_821 UNION ALL SELECT pk, col0 FROM view_2_tab4_821
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_821 UNION SELECT pk, col0 FROM view_2_tab4_821
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323) ) AS tab4_821
----
22 values hashing to fa560d564065cba63efa2c98c96dd927

query I rowsort label-2100-3
SELECT * FROM view_3_tab4_821
----
22 values hashing to fa560d564065cba63efa2c98c96dd927

query I rowsort label-2100-3
SELECT pk FROM tab4 WHERE ((col0 = 465) AND col0 BETWEEN 547 AND 973 OR col3 > 615 AND col1 < 669.21) AND (col0 > 323)
----
22 values hashing to fa560d564065cba63efa2c98c96dd927

statement ok
DROP VIEW view_1_tab4_821

statement ok
DROP VIEW view_2_tab4_821

statement ok
DROP VIEW view_3_tab4_821

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_822 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 656

statement ok
CREATE VIEW view_2_tab0_822 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 656)

statement ok
CREATE VIEW view_3_tab0_822 AS SELECT pk FROM view_1_tab0_822

query II rowsort label-2200-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 656
----
124 values hashing to 1bbacd7275df25bda74b98ac5c6e743c

query II rowsort label-2200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 656)
----
76 values hashing to 74c9cb5c67d7a4357694d1cdf3de5957

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab0_822
----
124 values hashing to 1bbacd7275df25bda74b98ac5c6e743c

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab0_822
----
76 values hashing to 74c9cb5c67d7a4357694d1cdf3de5957

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 656 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 656)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_822 UNION ALL SELECT pk, col0 FROM view_2_tab0_822
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 656 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 656)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_822 UNION SELECT pk, col0 FROM view_2_tab0_822
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 656 ) AS tab0_822
----
62 values hashing to e37a7ad542cc3c535eb736f629c9fafd

query I rowsort label-2200-3
SELECT * FROM view_3_tab0_822
----
62 values hashing to e37a7ad542cc3c535eb736f629c9fafd

query I rowsort label-2200-3
SELECT pk FROM tab0 WHERE col3 <= 656
----
62 values hashing to e37a7ad542cc3c535eb736f629c9fafd

statement ok
DROP VIEW view_1_tab0_822

statement ok
DROP VIEW view_2_tab0_822

statement ok
DROP VIEW view_3_tab0_822

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_822 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 656

statement ok
CREATE VIEW view_2_tab1_822 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 656)

statement ok
CREATE VIEW view_3_tab1_822 AS SELECT pk FROM view_1_tab1_822

query II rowsort label-2200-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 656
----
124 values hashing to 1bbacd7275df25bda74b98ac5c6e743c

query II rowsort label-2200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 656)
----
76 values hashing to 74c9cb5c67d7a4357694d1cdf3de5957

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab1_822
----
124 values hashing to 1bbacd7275df25bda74b98ac5c6e743c

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab1_822
----
76 values hashing to 74c9cb5c67d7a4357694d1cdf3de5957

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 656 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 656)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_822 UNION ALL SELECT pk, col0 FROM view_2_tab1_822
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 656 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 656)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_822 UNION SELECT pk, col0 FROM view_2_tab1_822
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 656 ) AS tab1_822
----
62 values hashing to e37a7ad542cc3c535eb736f629c9fafd

query I rowsort label-2200-3
SELECT * FROM view_3_tab1_822
----
62 values hashing to e37a7ad542cc3c535eb736f629c9fafd

query I rowsort label-2200-3
SELECT pk FROM tab1 WHERE col3 <= 656
----
62 values hashing to e37a7ad542cc3c535eb736f629c9fafd

statement ok
DROP VIEW view_1_tab1_822

statement ok
DROP VIEW view_2_tab1_822

statement ok
DROP VIEW view_3_tab1_822

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_822 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 656

statement ok
CREATE VIEW view_2_tab2_822 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 656)

statement ok
CREATE VIEW view_3_tab2_822 AS SELECT pk FROM view_1_tab2_822

query II rowsort label-2200-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 656
----
124 values hashing to 1bbacd7275df25bda74b98ac5c6e743c

query II rowsort label-2200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 656)
----
76 values hashing to 74c9cb5c67d7a4357694d1cdf3de5957

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab2_822
----
124 values hashing to 1bbacd7275df25bda74b98ac5c6e743c

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab2_822
----
76 values hashing to 74c9cb5c67d7a4357694d1cdf3de5957

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 656 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 656)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_822 UNION ALL SELECT pk, col0 FROM view_2_tab2_822
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 656 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 656)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_822 UNION SELECT pk, col0 FROM view_2_tab2_822
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 656 ) AS tab2_822
----
62 values hashing to e37a7ad542cc3c535eb736f629c9fafd

query I rowsort label-2200-3
SELECT * FROM view_3_tab2_822
----
62 values hashing to e37a7ad542cc3c535eb736f629c9fafd

query I rowsort label-2200-3
SELECT pk FROM tab2 WHERE col3 <= 656
----
62 values hashing to e37a7ad542cc3c535eb736f629c9fafd

statement ok
DROP VIEW view_1_tab2_822

statement ok
DROP VIEW view_2_tab2_822

statement ok
DROP VIEW view_3_tab2_822

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_822 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 656

statement ok
CREATE VIEW view_2_tab3_822 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 656)

statement ok
CREATE VIEW view_3_tab3_822 AS SELECT pk FROM view_1_tab3_822

query II rowsort label-2200-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 656
----
124 values hashing to 1bbacd7275df25bda74b98ac5c6e743c

query II rowsort label-2200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 656)
----
76 values hashing to 74c9cb5c67d7a4357694d1cdf3de5957

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab3_822
----
124 values hashing to 1bbacd7275df25bda74b98ac5c6e743c

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab3_822
----
76 values hashing to 74c9cb5c67d7a4357694d1cdf3de5957

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 656 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 656)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_822 UNION ALL SELECT pk, col0 FROM view_2_tab3_822
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 656 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 656)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_822 UNION SELECT pk, col0 FROM view_2_tab3_822
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 656 ) AS tab3_822
----
62 values hashing to e37a7ad542cc3c535eb736f629c9fafd

query I rowsort label-2200-3
SELECT * FROM view_3_tab3_822
----
62 values hashing to e37a7ad542cc3c535eb736f629c9fafd

query I rowsort label-2200-3
SELECT pk FROM tab3 WHERE col3 <= 656
----
62 values hashing to e37a7ad542cc3c535eb736f629c9fafd

statement ok
DROP VIEW view_1_tab3_822

statement ok
DROP VIEW view_2_tab3_822

statement ok
DROP VIEW view_3_tab3_822

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_822 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 656

statement ok
CREATE VIEW view_2_tab4_822 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 656)

statement ok
CREATE VIEW view_3_tab4_822 AS SELECT pk FROM view_1_tab4_822

query II rowsort label-2200-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 656
----
124 values hashing to 1bbacd7275df25bda74b98ac5c6e743c

query II rowsort label-2200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 656)
----
76 values hashing to 74c9cb5c67d7a4357694d1cdf3de5957

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab4_822
----
124 values hashing to 1bbacd7275df25bda74b98ac5c6e743c

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab4_822
----
76 values hashing to 74c9cb5c67d7a4357694d1cdf3de5957

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 656 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 656)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_822 UNION ALL SELECT pk, col0 FROM view_2_tab4_822
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 656 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 656)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_822 UNION SELECT pk, col0 FROM view_2_tab4_822
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 656 ) AS tab4_822
----
62 values hashing to e37a7ad542cc3c535eb736f629c9fafd

query I rowsort label-2200-3
SELECT * FROM view_3_tab4_822
----
62 values hashing to e37a7ad542cc3c535eb736f629c9fafd

query I rowsort label-2200-3
SELECT pk FROM tab4 WHERE col3 <= 656
----
62 values hashing to e37a7ad542cc3c535eb736f629c9fafd

statement ok
DROP VIEW view_1_tab4_822

statement ok
DROP VIEW view_2_tab4_822

statement ok
DROP VIEW view_3_tab4_822

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_823 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 174 AND (col0 = 365))

statement ok
CREATE VIEW view_2_tab0_823 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 174 AND (col0 = 365)))

statement ok
CREATE VIEW view_3_tab0_823 AS SELECT pk FROM view_1_tab0_823

query II rowsort label-2300-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 174 AND (col0 = 365))
----

query II rowsort label-2300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 174 AND (col0 = 365)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab0_823
----

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab0_823
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 174 AND (col0 = 365)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 174 AND (col0 = 365)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_823 UNION ALL SELECT pk, col0 FROM view_2_tab0_823
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 174 AND (col0 = 365)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 174 AND (col0 = 365)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_823 UNION SELECT pk, col0 FROM view_2_tab0_823
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 174 AND (col0 = 365)) ) AS tab0_823
----

query I rowsort label-2300-3
SELECT * FROM view_3_tab0_823
----

query I rowsort label-2300-3
SELECT pk FROM tab0 WHERE (col0 < 174 AND (col0 = 365))
----

statement ok
DROP VIEW view_1_tab0_823

statement ok
DROP VIEW view_2_tab0_823

statement ok
DROP VIEW view_3_tab0_823

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_823 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 174 AND (col0 = 365))

statement ok
CREATE VIEW view_2_tab1_823 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 174 AND (col0 = 365)))

statement ok
CREATE VIEW view_3_tab1_823 AS SELECT pk FROM view_1_tab1_823

query II rowsort label-2300-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 174 AND (col0 = 365))
----

query II rowsort label-2300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 174 AND (col0 = 365)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab1_823
----

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab1_823
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 174 AND (col0 = 365)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 174 AND (col0 = 365)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_823 UNION ALL SELECT pk, col0 FROM view_2_tab1_823
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 174 AND (col0 = 365)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 174 AND (col0 = 365)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_823 UNION SELECT pk, col0 FROM view_2_tab1_823
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 174 AND (col0 = 365)) ) AS tab1_823
----

query I rowsort label-2300-3
SELECT * FROM view_3_tab1_823
----

query I rowsort label-2300-3
SELECT pk FROM tab1 WHERE (col0 < 174 AND (col0 = 365))
----

statement ok
DROP VIEW view_1_tab1_823

statement ok
DROP VIEW view_2_tab1_823

statement ok
DROP VIEW view_3_tab1_823

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_823 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 174 AND (col0 = 365))

statement ok
CREATE VIEW view_2_tab2_823 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 174 AND (col0 = 365)))

statement ok
CREATE VIEW view_3_tab2_823 AS SELECT pk FROM view_1_tab2_823

query II rowsort label-2300-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 174 AND (col0 = 365))
----

query II rowsort label-2300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 174 AND (col0 = 365)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab2_823
----

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab2_823
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 174 AND (col0 = 365)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 174 AND (col0 = 365)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_823 UNION ALL SELECT pk, col0 FROM view_2_tab2_823
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 174 AND (col0 = 365)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 174 AND (col0 = 365)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_823 UNION SELECT pk, col0 FROM view_2_tab2_823
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 174 AND (col0 = 365)) ) AS tab2_823
----

query I rowsort label-2300-3
SELECT * FROM view_3_tab2_823
----

query I rowsort label-2300-3
SELECT pk FROM tab2 WHERE (col0 < 174 AND (col0 = 365))
----

statement ok
DROP VIEW view_1_tab2_823

statement ok
DROP VIEW view_2_tab2_823

statement ok
DROP VIEW view_3_tab2_823

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_823 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 174 AND (col0 = 365))

statement ok
CREATE VIEW view_2_tab3_823 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 174 AND (col0 = 365)))

statement ok
CREATE VIEW view_3_tab3_823 AS SELECT pk FROM view_1_tab3_823

query II rowsort label-2300-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 174 AND (col0 = 365))
----

query II rowsort label-2300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 174 AND (col0 = 365)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab3_823
----

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab3_823
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 174 AND (col0 = 365)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 174 AND (col0 = 365)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_823 UNION ALL SELECT pk, col0 FROM view_2_tab3_823
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 174 AND (col0 = 365)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 174 AND (col0 = 365)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_823 UNION SELECT pk, col0 FROM view_2_tab3_823
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 174 AND (col0 = 365)) ) AS tab3_823
----

query I rowsort label-2300-3
SELECT * FROM view_3_tab3_823
----

query I rowsort label-2300-3
SELECT pk FROM tab3 WHERE (col0 < 174 AND (col0 = 365))
----

statement ok
DROP VIEW view_1_tab3_823

statement ok
DROP VIEW view_2_tab3_823

statement ok
DROP VIEW view_3_tab3_823

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_823 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 174 AND (col0 = 365))

statement ok
CREATE VIEW view_2_tab4_823 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 174 AND (col0 = 365)))

statement ok
CREATE VIEW view_3_tab4_823 AS SELECT pk FROM view_1_tab4_823

query II rowsort label-2300-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 174 AND (col0 = 365))
----

query II rowsort label-2300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 174 AND (col0 = 365)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab4_823
----

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab4_823
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 174 AND (col0 = 365)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 174 AND (col0 = 365)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_823 UNION ALL SELECT pk, col0 FROM view_2_tab4_823
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 174 AND (col0 = 365)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 174 AND (col0 = 365)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_823 UNION SELECT pk, col0 FROM view_2_tab4_823
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 174 AND (col0 = 365)) ) AS tab4_823
----

query I rowsort label-2300-3
SELECT * FROM view_3_tab4_823
----

query I rowsort label-2300-3
SELECT pk FROM tab4 WHERE (col0 < 174 AND (col0 = 365))
----

statement ok
DROP VIEW view_1_tab4_823

statement ok
DROP VIEW view_2_tab4_823

statement ok
DROP VIEW view_3_tab4_823

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_824 AS SELECT pk, col0 FROM tab0 WHERE (col1 >= 499.38 AND col4 >= 64.68)

statement ok
CREATE VIEW view_2_tab0_824 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))

statement ok
CREATE VIEW view_3_tab0_824 AS SELECT pk FROM view_1_tab0_824

query II rowsort label-2400-1
SELECT pk, col0 FROM tab0 WHERE (col1 >= 499.38 AND col4 >= 64.68)
----
96 values hashing to 312635ee4771b3097a78c5b3bef902b6

query II rowsort label-2400-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))
----
104 values hashing to cc9c57c807226ba436e436f63d8134ce

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab0_824
----
96 values hashing to 312635ee4771b3097a78c5b3bef902b6

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab0_824
----
104 values hashing to cc9c57c807226ba436e436f63d8134ce

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 >= 499.38 AND col4 >= 64.68) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_824 UNION ALL SELECT pk, col0 FROM view_2_tab0_824
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 >= 499.38 AND col4 >= 64.68) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_824 UNION SELECT pk, col0 FROM view_2_tab0_824
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 >= 499.38 AND col4 >= 64.68) ) AS tab0_824
----
48 values hashing to 2e06bf3518ad1d975ecbcb162f697e0a

query I rowsort label-2400-3
SELECT * FROM view_3_tab0_824
----
48 values hashing to 2e06bf3518ad1d975ecbcb162f697e0a

query I rowsort label-2400-3
SELECT pk FROM tab0 WHERE (col1 >= 499.38 AND col4 >= 64.68)
----
48 values hashing to 2e06bf3518ad1d975ecbcb162f697e0a

statement ok
DROP VIEW view_1_tab0_824

statement ok
DROP VIEW view_2_tab0_824

statement ok
DROP VIEW view_3_tab0_824

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_824 AS SELECT pk, col0 FROM tab1 WHERE (col1 >= 499.38 AND col4 >= 64.68)

statement ok
CREATE VIEW view_2_tab1_824 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))

statement ok
CREATE VIEW view_3_tab1_824 AS SELECT pk FROM view_1_tab1_824

query II rowsort label-2400-1
SELECT pk, col0 FROM tab1 WHERE (col1 >= 499.38 AND col4 >= 64.68)
----
96 values hashing to 312635ee4771b3097a78c5b3bef902b6

query II rowsort label-2400-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))
----
104 values hashing to cc9c57c807226ba436e436f63d8134ce

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab1_824
----
96 values hashing to 312635ee4771b3097a78c5b3bef902b6

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab1_824
----
104 values hashing to cc9c57c807226ba436e436f63d8134ce

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 >= 499.38 AND col4 >= 64.68) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_824 UNION ALL SELECT pk, col0 FROM view_2_tab1_824
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 >= 499.38 AND col4 >= 64.68) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_824 UNION SELECT pk, col0 FROM view_2_tab1_824
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 >= 499.38 AND col4 >= 64.68) ) AS tab1_824
----
48 values hashing to 2e06bf3518ad1d975ecbcb162f697e0a

query I rowsort label-2400-3
SELECT * FROM view_3_tab1_824
----
48 values hashing to 2e06bf3518ad1d975ecbcb162f697e0a

query I rowsort label-2400-3
SELECT pk FROM tab1 WHERE (col1 >= 499.38 AND col4 >= 64.68)
----
48 values hashing to 2e06bf3518ad1d975ecbcb162f697e0a

statement ok
DROP VIEW view_1_tab1_824

statement ok
DROP VIEW view_2_tab1_824

statement ok
DROP VIEW view_3_tab1_824

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_824 AS SELECT pk, col0 FROM tab2 WHERE (col1 >= 499.38 AND col4 >= 64.68)

statement ok
CREATE VIEW view_2_tab2_824 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))

statement ok
CREATE VIEW view_3_tab2_824 AS SELECT pk FROM view_1_tab2_824

query II rowsort label-2400-1
SELECT pk, col0 FROM tab2 WHERE (col1 >= 499.38 AND col4 >= 64.68)
----
96 values hashing to 312635ee4771b3097a78c5b3bef902b6

query II rowsort label-2400-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))
----
104 values hashing to cc9c57c807226ba436e436f63d8134ce

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab2_824
----
96 values hashing to 312635ee4771b3097a78c5b3bef902b6

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab2_824
----
104 values hashing to cc9c57c807226ba436e436f63d8134ce

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 >= 499.38 AND col4 >= 64.68) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_824 UNION ALL SELECT pk, col0 FROM view_2_tab2_824
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 >= 499.38 AND col4 >= 64.68) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_824 UNION SELECT pk, col0 FROM view_2_tab2_824
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 >= 499.38 AND col4 >= 64.68) ) AS tab2_824
----
48 values hashing to 2e06bf3518ad1d975ecbcb162f697e0a

query I rowsort label-2400-3
SELECT * FROM view_3_tab2_824
----
48 values hashing to 2e06bf3518ad1d975ecbcb162f697e0a

query I rowsort label-2400-3
SELECT pk FROM tab2 WHERE (col1 >= 499.38 AND col4 >= 64.68)
----
48 values hashing to 2e06bf3518ad1d975ecbcb162f697e0a

statement ok
DROP VIEW view_1_tab2_824

statement ok
DROP VIEW view_2_tab2_824

statement ok
DROP VIEW view_3_tab2_824

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

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

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_824') DROP VIEW view_2_tab3_824

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_824

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_824') DROP VIEW view_3_tab3_824

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_824

statement ok
CREATE VIEW view_1_tab3_824 AS SELECT pk, col0 FROM tab3 WHERE (col1 >= 499.38 AND col4 >= 64.68)

statement ok
CREATE VIEW view_2_tab3_824 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))

statement ok
CREATE VIEW view_3_tab3_824 AS SELECT pk FROM view_1_tab3_824

query II rowsort label-2400-1
SELECT pk, col0 FROM tab3 WHERE (col1 >= 499.38 AND col4 >= 64.68)
----
96 values hashing to 312635ee4771b3097a78c5b3bef902b6

query II rowsort label-2400-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))
----
104 values hashing to cc9c57c807226ba436e436f63d8134ce

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab3_824
----
96 values hashing to 312635ee4771b3097a78c5b3bef902b6

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab3_824
----
104 values hashing to cc9c57c807226ba436e436f63d8134ce

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 >= 499.38 AND col4 >= 64.68) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_824 UNION ALL SELECT pk, col0 FROM view_2_tab3_824
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 >= 499.38 AND col4 >= 64.68) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_824 UNION SELECT pk, col0 FROM view_2_tab3_824
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 >= 499.38 AND col4 >= 64.68) ) AS tab3_824
----
48 values hashing to 2e06bf3518ad1d975ecbcb162f697e0a

query I rowsort label-2400-3
SELECT * FROM view_3_tab3_824
----
48 values hashing to 2e06bf3518ad1d975ecbcb162f697e0a

query I rowsort label-2400-3
SELECT pk FROM tab3 WHERE (col1 >= 499.38 AND col4 >= 64.68)
----
48 values hashing to 2e06bf3518ad1d975ecbcb162f697e0a

statement ok
DROP VIEW view_1_tab3_824

statement ok
DROP VIEW view_2_tab3_824

statement ok
DROP VIEW view_3_tab3_824

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_824') DROP VIEW view_1_tab4_824

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_824

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_824') DROP VIEW view_2_tab4_824

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_824

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_824') DROP VIEW view_3_tab4_824

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_824

statement ok
CREATE VIEW view_1_tab4_824 AS SELECT pk, col0 FROM tab4 WHERE (col1 >= 499.38 AND col4 >= 64.68)

statement ok
CREATE VIEW view_2_tab4_824 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))

statement ok
CREATE VIEW view_3_tab4_824 AS SELECT pk FROM view_1_tab4_824

query II rowsort label-2400-1
SELECT pk, col0 FROM tab4 WHERE (col1 >= 499.38 AND col4 >= 64.68)
----
96 values hashing to 312635ee4771b3097a78c5b3bef902b6

query II rowsort label-2400-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))
----
104 values hashing to cc9c57c807226ba436e436f63d8134ce

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab4_824
----
96 values hashing to 312635ee4771b3097a78c5b3bef902b6

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab4_824
----
104 values hashing to cc9c57c807226ba436e436f63d8134ce

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 >= 499.38 AND col4 >= 64.68) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_824 UNION ALL SELECT pk, col0 FROM view_2_tab4_824
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 >= 499.38 AND col4 >= 64.68) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 499.38 AND col4 >= 64.68))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_824 UNION SELECT pk, col0 FROM view_2_tab4_824
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 >= 499.38 AND col4 >= 64.68) ) AS tab4_824
----
48 values hashing to 2e06bf3518ad1d975ecbcb162f697e0a

query I rowsort label-2400-3
SELECT * FROM view_3_tab4_824
----
48 values hashing to 2e06bf3518ad1d975ecbcb162f697e0a

query I rowsort label-2400-3
SELECT pk FROM tab4 WHERE (col1 >= 499.38 AND col4 >= 64.68)
----
48 values hashing to 2e06bf3518ad1d975ecbcb162f697e0a

statement ok
DROP VIEW view_1_tab4_824

statement ok
DROP VIEW view_2_tab4_824

statement ok
DROP VIEW view_3_tab4_824

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_825') DROP VIEW view_1_tab0_825

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_825

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_825') DROP VIEW view_2_tab0_825

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_825

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_825') DROP VIEW view_3_tab0_825

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_825

statement ok
CREATE VIEW view_1_tab0_825 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89

statement ok
CREATE VIEW view_2_tab0_825 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)

statement ok
CREATE VIEW view_3_tab0_825 AS SELECT pk FROM view_1_tab0_825

query II rowsort label-2500-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89
----
186 values hashing to 66f9d56bb817e915a68cb189b296245b

query II rowsort label-2500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)
----
14 values hashing to 6fa9479a4e5aa8ebbd2c35760956c949

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab0_825
----
186 values hashing to 66f9d56bb817e915a68cb189b296245b

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab0_825
----
14 values hashing to 6fa9479a4e5aa8ebbd2c35760956c949

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_825 UNION ALL SELECT pk, col0 FROM view_2_tab0_825
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_825 UNION SELECT pk, col0 FROM view_2_tab0_825
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89 ) AS tab0_825
----
93 values hashing to 3408e0b17701a5f5f812818cebee1a2e

query I rowsort label-2500-3
SELECT * FROM view_3_tab0_825
----
93 values hashing to 3408e0b17701a5f5f812818cebee1a2e

query I rowsort label-2500-3
SELECT pk FROM tab0 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89
----
93 values hashing to 3408e0b17701a5f5f812818cebee1a2e

statement ok
DROP VIEW view_1_tab0_825

statement ok
DROP VIEW view_2_tab0_825

statement ok
DROP VIEW view_3_tab0_825

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_825') DROP VIEW view_1_tab1_825

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_825

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_825') DROP VIEW view_2_tab1_825

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_825

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_825') DROP VIEW view_3_tab1_825

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_825

statement ok
CREATE VIEW view_1_tab1_825 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89

statement ok
CREATE VIEW view_2_tab1_825 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)

statement ok
CREATE VIEW view_3_tab1_825 AS SELECT pk FROM view_1_tab1_825

query II rowsort label-2500-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89
----
186 values hashing to 66f9d56bb817e915a68cb189b296245b

query II rowsort label-2500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)
----
14 values hashing to 6fa9479a4e5aa8ebbd2c35760956c949

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab1_825
----
186 values hashing to 66f9d56bb817e915a68cb189b296245b

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab1_825
----
14 values hashing to 6fa9479a4e5aa8ebbd2c35760956c949

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_825 UNION ALL SELECT pk, col0 FROM view_2_tab1_825
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_825 UNION SELECT pk, col0 FROM view_2_tab1_825
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89 ) AS tab1_825
----
93 values hashing to 3408e0b17701a5f5f812818cebee1a2e

query I rowsort label-2500-3
SELECT * FROM view_3_tab1_825
----
93 values hashing to 3408e0b17701a5f5f812818cebee1a2e

query I rowsort label-2500-3
SELECT pk FROM tab1 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89
----
93 values hashing to 3408e0b17701a5f5f812818cebee1a2e

statement ok
DROP VIEW view_1_tab1_825

statement ok
DROP VIEW view_2_tab1_825

statement ok
DROP VIEW view_3_tab1_825

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_825') DROP VIEW view_1_tab2_825

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_825

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_825') DROP VIEW view_2_tab2_825

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_825

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_825') DROP VIEW view_3_tab2_825

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_825

statement ok
CREATE VIEW view_1_tab2_825 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89

statement ok
CREATE VIEW view_2_tab2_825 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)

statement ok
CREATE VIEW view_3_tab2_825 AS SELECT pk FROM view_1_tab2_825

query II rowsort label-2500-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89
----
186 values hashing to 66f9d56bb817e915a68cb189b296245b

query II rowsort label-2500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)
----
14 values hashing to 6fa9479a4e5aa8ebbd2c35760956c949

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab2_825
----
186 values hashing to 66f9d56bb817e915a68cb189b296245b

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab2_825
----
14 values hashing to 6fa9479a4e5aa8ebbd2c35760956c949

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_825 UNION ALL SELECT pk, col0 FROM view_2_tab2_825
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_825 UNION SELECT pk, col0 FROM view_2_tab2_825
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89 ) AS tab2_825
----
93 values hashing to 3408e0b17701a5f5f812818cebee1a2e

query I rowsort label-2500-3
SELECT * FROM view_3_tab2_825
----
93 values hashing to 3408e0b17701a5f5f812818cebee1a2e

query I rowsort label-2500-3
SELECT pk FROM tab2 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89
----
93 values hashing to 3408e0b17701a5f5f812818cebee1a2e

statement ok
DROP VIEW view_1_tab2_825

statement ok
DROP VIEW view_2_tab2_825

statement ok
DROP VIEW view_3_tab2_825

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_825') DROP VIEW view_1_tab3_825

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_825

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_825') DROP VIEW view_2_tab3_825

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_825

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_825') DROP VIEW view_3_tab3_825

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_825

statement ok
CREATE VIEW view_1_tab3_825 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89

statement ok
CREATE VIEW view_2_tab3_825 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)

statement ok
CREATE VIEW view_3_tab3_825 AS SELECT pk FROM view_1_tab3_825

query II rowsort label-2500-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89
----
186 values hashing to 66f9d56bb817e915a68cb189b296245b

query II rowsort label-2500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)
----
14 values hashing to 6fa9479a4e5aa8ebbd2c35760956c949

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab3_825
----
186 values hashing to 66f9d56bb817e915a68cb189b296245b

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab3_825
----
14 values hashing to 6fa9479a4e5aa8ebbd2c35760956c949

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_825 UNION ALL SELECT pk, col0 FROM view_2_tab3_825
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_825 UNION SELECT pk, col0 FROM view_2_tab3_825
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89 ) AS tab3_825
----
93 values hashing to 3408e0b17701a5f5f812818cebee1a2e

query I rowsort label-2500-3
SELECT * FROM view_3_tab3_825
----
93 values hashing to 3408e0b17701a5f5f812818cebee1a2e

query I rowsort label-2500-3
SELECT pk FROM tab3 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89
----
93 values hashing to 3408e0b17701a5f5f812818cebee1a2e

statement ok
DROP VIEW view_1_tab3_825

statement ok
DROP VIEW view_2_tab3_825

statement ok
DROP VIEW view_3_tab3_825

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_825') DROP VIEW view_1_tab4_825

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_825

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_825') DROP VIEW view_2_tab4_825

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_825

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_825') DROP VIEW view_3_tab4_825

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_825

statement ok
CREATE VIEW view_1_tab4_825 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89

statement ok
CREATE VIEW view_2_tab4_825 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)

statement ok
CREATE VIEW view_3_tab4_825 AS SELECT pk FROM view_1_tab4_825

query II rowsort label-2500-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89
----
186 values hashing to 66f9d56bb817e915a68cb189b296245b

query II rowsort label-2500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)
----
14 values hashing to 6fa9479a4e5aa8ebbd2c35760956c949

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab4_825
----
186 values hashing to 66f9d56bb817e915a68cb189b296245b

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab4_825
----
14 values hashing to 6fa9479a4e5aa8ebbd2c35760956c949

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_825 UNION ALL SELECT pk, col0 FROM view_2_tab4_825
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_825 UNION SELECT pk, col0 FROM view_2_tab4_825
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89 ) AS tab4_825
----
93 values hashing to 3408e0b17701a5f5f812818cebee1a2e

query I rowsort label-2500-3
SELECT * FROM view_3_tab4_825
----
93 values hashing to 3408e0b17701a5f5f812818cebee1a2e

query I rowsort label-2500-3
SELECT pk FROM tab4 WHERE col0 <= 881 OR col0 < 634 OR (col4 IS NULL AND col1 <= 569.12 OR col3 <= 666 AND (col0 IS NULL) AND col1 > 270.42 OR ((col3 < 817)) OR col1 <= 674.39 OR (((col1 IS NULL))) AND col3 < 607 OR col3 > 733 OR col1 > 214.29 OR col4 > 718.44 AND col0 <= 136) AND col1 <= 609.89
----
93 values hashing to 3408e0b17701a5f5f812818cebee1a2e

statement ok
DROP VIEW view_1_tab4_825

statement ok
DROP VIEW view_2_tab4_825

statement ok
DROP VIEW view_3_tab4_825

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_826') DROP VIEW view_1_tab0_826

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_826

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_826') DROP VIEW view_2_tab0_826

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_826

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_826') DROP VIEW view_3_tab0_826

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_826

statement ok
CREATE VIEW view_1_tab0_826 AS SELECT pk, col0 FROM tab0 WHERE (col3 >= 850)

statement ok
CREATE VIEW view_2_tab0_826 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 850))

statement ok
CREATE VIEW view_3_tab0_826 AS SELECT pk FROM view_1_tab0_826

query II rowsort label-2600-1
SELECT pk, col0 FROM tab0 WHERE (col3 >= 850)
----
28 values hashing to fc81ad1a3c221aa4a522b619e254638b

query II rowsort label-2600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 850))
----
172 values hashing to b465cd58fcecae8a26392d63136513df

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab0_826
----
28 values hashing to fc81ad1a3c221aa4a522b619e254638b

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab0_826
----
172 values hashing to b465cd58fcecae8a26392d63136513df

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 850) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 850))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_826 UNION ALL SELECT pk, col0 FROM view_2_tab0_826
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 850) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 850))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_826 UNION SELECT pk, col0 FROM view_2_tab0_826
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 >= 850) ) AS tab0_826
----
14 values hashing to 79dbd7c2b04da15055bffe925a103246

query I rowsort label-2600-3
SELECT * FROM view_3_tab0_826
----
14 values hashing to 79dbd7c2b04da15055bffe925a103246

query I rowsort label-2600-3
SELECT pk FROM tab0 WHERE (col3 >= 850)
----
14 values hashing to 79dbd7c2b04da15055bffe925a103246

statement ok
DROP VIEW view_1_tab0_826

statement ok
DROP VIEW view_2_tab0_826

statement ok
DROP VIEW view_3_tab0_826

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_826') DROP VIEW view_1_tab1_826

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_826

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_826') DROP VIEW view_2_tab1_826

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_826

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_826') DROP VIEW view_3_tab1_826

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_826

statement ok
CREATE VIEW view_1_tab1_826 AS SELECT pk, col0 FROM tab1 WHERE (col3 >= 850)

statement ok
CREATE VIEW view_2_tab1_826 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 850))

statement ok
CREATE VIEW view_3_tab1_826 AS SELECT pk FROM view_1_tab1_826

query II rowsort label-2600-1
SELECT pk, col0 FROM tab1 WHERE (col3 >= 850)
----
28 values hashing to fc81ad1a3c221aa4a522b619e254638b

query II rowsort label-2600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 850))
----
172 values hashing to b465cd58fcecae8a26392d63136513df

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab1_826
----
28 values hashing to fc81ad1a3c221aa4a522b619e254638b

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab1_826
----
172 values hashing to b465cd58fcecae8a26392d63136513df

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 850) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 850))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_826 UNION ALL SELECT pk, col0 FROM view_2_tab1_826
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 850) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 850))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_826 UNION SELECT pk, col0 FROM view_2_tab1_826
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 >= 850) ) AS tab1_826
----
14 values hashing to 79dbd7c2b04da15055bffe925a103246

query I rowsort label-2600-3
SELECT * FROM view_3_tab1_826
----
14 values hashing to 79dbd7c2b04da15055bffe925a103246

query I rowsort label-2600-3
SELECT pk FROM tab1 WHERE (col3 >= 850)
----
14 values hashing to 79dbd7c2b04da15055bffe925a103246

statement ok
DROP VIEW view_1_tab1_826

statement ok
DROP VIEW view_2_tab1_826

statement ok
DROP VIEW view_3_tab1_826

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_826') DROP VIEW view_1_tab2_826

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_826

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_826') DROP VIEW view_2_tab2_826

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_826

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_826') DROP VIEW view_3_tab2_826

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_826

statement ok
CREATE VIEW view_1_tab2_826 AS SELECT pk, col0 FROM tab2 WHERE (col3 >= 850)

statement ok
CREATE VIEW view_2_tab2_826 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 850))

statement ok
CREATE VIEW view_3_tab2_826 AS SELECT pk FROM view_1_tab2_826

query II rowsort label-2600-1
SELECT pk, col0 FROM tab2 WHERE (col3 >= 850)
----
28 values hashing to fc81ad1a3c221aa4a522b619e254638b

query II rowsort label-2600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 850))
----
172 values hashing to b465cd58fcecae8a26392d63136513df

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab2_826
----
28 values hashing to fc81ad1a3c221aa4a522b619e254638b

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab2_826
----
172 values hashing to b465cd58fcecae8a26392d63136513df

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 850) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 850))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_826 UNION ALL SELECT pk, col0 FROM view_2_tab2_826
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 850) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 850))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_826 UNION SELECT pk, col0 FROM view_2_tab2_826
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 >= 850) ) AS tab2_826
----
14 values hashing to 79dbd7c2b04da15055bffe925a103246

query I rowsort label-2600-3
SELECT * FROM view_3_tab2_826
----
14 values hashing to 79dbd7c2b04da15055bffe925a103246

query I rowsort label-2600-3
SELECT pk FROM tab2 WHERE (col3 >= 850)
----
14 values hashing to 79dbd7c2b04da15055bffe925a103246

statement ok
DROP VIEW view_1_tab2_826

statement ok
DROP VIEW view_2_tab2_826

statement ok
DROP VIEW view_3_tab2_826

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_826') DROP VIEW view_1_tab3_826

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_826

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_826') DROP VIEW view_2_tab3_826

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_826

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_826') DROP VIEW view_3_tab3_826

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_826

statement ok
CREATE VIEW view_1_tab3_826 AS SELECT pk, col0 FROM tab3 WHERE (col3 >= 850)

statement ok
CREATE VIEW view_2_tab3_826 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 850))

statement ok
CREATE VIEW view_3_tab3_826 AS SELECT pk FROM view_1_tab3_826

query II rowsort label-2600-1
SELECT pk, col0 FROM tab3 WHERE (col3 >= 850)
----
28 values hashing to fc81ad1a3c221aa4a522b619e254638b

query II rowsort label-2600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 850))
----
172 values hashing to b465cd58fcecae8a26392d63136513df

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab3_826
----
28 values hashing to fc81ad1a3c221aa4a522b619e254638b

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab3_826
----
172 values hashing to b465cd58fcecae8a26392d63136513df

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 850) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 850))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_826 UNION ALL SELECT pk, col0 FROM view_2_tab3_826
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 850) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 850))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_826 UNION SELECT pk, col0 FROM view_2_tab3_826
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 >= 850) ) AS tab3_826
----
14 values hashing to 79dbd7c2b04da15055bffe925a103246

query I rowsort label-2600-3
SELECT * FROM view_3_tab3_826
----
14 values hashing to 79dbd7c2b04da15055bffe925a103246

query I rowsort label-2600-3
SELECT pk FROM tab3 WHERE (col3 >= 850)
----
14 values hashing to 79dbd7c2b04da15055bffe925a103246

statement ok
DROP VIEW view_1_tab3_826

statement ok
DROP VIEW view_2_tab3_826

statement ok
DROP VIEW view_3_tab3_826

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_826') DROP VIEW view_1_tab4_826

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_826

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_826') DROP VIEW view_2_tab4_826

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_826

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_826') DROP VIEW view_3_tab4_826

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_826

statement ok
CREATE VIEW view_1_tab4_826 AS SELECT pk, col0 FROM tab4 WHERE (col3 >= 850)

statement ok
CREATE VIEW view_2_tab4_826 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 850))

statement ok
CREATE VIEW view_3_tab4_826 AS SELECT pk FROM view_1_tab4_826

query II rowsort label-2600-1
SELECT pk, col0 FROM tab4 WHERE (col3 >= 850)
----
28 values hashing to fc81ad1a3c221aa4a522b619e254638b

query II rowsort label-2600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 850))
----
172 values hashing to b465cd58fcecae8a26392d63136513df

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab4_826
----
28 values hashing to fc81ad1a3c221aa4a522b619e254638b

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab4_826
----
172 values hashing to b465cd58fcecae8a26392d63136513df

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 850) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 850))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_826 UNION ALL SELECT pk, col0 FROM view_2_tab4_826
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 850) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 850))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_826 UNION SELECT pk, col0 FROM view_2_tab4_826
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 >= 850) ) AS tab4_826
----
14 values hashing to 79dbd7c2b04da15055bffe925a103246

query I rowsort label-2600-3
SELECT * FROM view_3_tab4_826
----
14 values hashing to 79dbd7c2b04da15055bffe925a103246

query I rowsort label-2600-3
SELECT pk FROM tab4 WHERE (col3 >= 850)
----
14 values hashing to 79dbd7c2b04da15055bffe925a103246

statement ok
DROP VIEW view_1_tab4_826

statement ok
DROP VIEW view_2_tab4_826

statement ok
DROP VIEW view_3_tab4_826

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_827') DROP VIEW view_1_tab0_827

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_827

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_827') DROP VIEW view_2_tab0_827

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_827

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_827') DROP VIEW view_3_tab0_827

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_827

statement ok
CREATE VIEW view_1_tab0_827 AS SELECT pk, col0 FROM tab0 WHERE col0 < 914 AND col1 < 446.23

statement ok
CREATE VIEW view_2_tab0_827 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 914 AND col1 < 446.23)

statement ok
CREATE VIEW view_3_tab0_827 AS SELECT pk FROM view_1_tab0_827

query II rowsort label-2700-1
SELECT pk, col0 FROM tab0 WHERE col0 < 914 AND col1 < 446.23
----
76 values hashing to a6872f0b3650d05141bc4180da32c615

query II rowsort label-2700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 914 AND col1 < 446.23)
----
124 values hashing to 38a38c75cf76e87abb3cd41a5f872f05

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab0_827
----
76 values hashing to a6872f0b3650d05141bc4180da32c615

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab0_827
----
124 values hashing to 38a38c75cf76e87abb3cd41a5f872f05

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 914 AND col1 < 446.23 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 914 AND col1 < 446.23)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_827 UNION ALL SELECT pk, col0 FROM view_2_tab0_827
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 914 AND col1 < 446.23 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 914 AND col1 < 446.23)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_827 UNION SELECT pk, col0 FROM view_2_tab0_827
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 914 AND col1 < 446.23 ) AS tab0_827
----
38 values hashing to 1efa0cb3bf3974705e352fb091e420bf

query I rowsort label-2700-3
SELECT * FROM view_3_tab0_827
----
38 values hashing to 1efa0cb3bf3974705e352fb091e420bf

query I rowsort label-2700-3
SELECT pk FROM tab0 WHERE col0 < 914 AND col1 < 446.23
----
38 values hashing to 1efa0cb3bf3974705e352fb091e420bf

statement ok
DROP VIEW view_1_tab0_827

statement ok
DROP VIEW view_2_tab0_827

statement ok
DROP VIEW view_3_tab0_827

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_827') DROP VIEW view_1_tab1_827

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_827

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_827') DROP VIEW view_2_tab1_827

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_827

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_827') DROP VIEW view_3_tab1_827

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_827

statement ok
CREATE VIEW view_1_tab1_827 AS SELECT pk, col0 FROM tab1 WHERE col0 < 914 AND col1 < 446.23

statement ok
CREATE VIEW view_2_tab1_827 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 914 AND col1 < 446.23)

statement ok
CREATE VIEW view_3_tab1_827 AS SELECT pk FROM view_1_tab1_827

query II rowsort label-2700-1
SELECT pk, col0 FROM tab1 WHERE col0 < 914 AND col1 < 446.23
----
76 values hashing to a6872f0b3650d05141bc4180da32c615

query II rowsort label-2700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 914 AND col1 < 446.23)
----
124 values hashing to 38a38c75cf76e87abb3cd41a5f872f05

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab1_827
----
76 values hashing to a6872f0b3650d05141bc4180da32c615

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab1_827
----
124 values hashing to 38a38c75cf76e87abb3cd41a5f872f05

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 914 AND col1 < 446.23 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 914 AND col1 < 446.23)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_827 UNION ALL SELECT pk, col0 FROM view_2_tab1_827
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 914 AND col1 < 446.23 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 914 AND col1 < 446.23)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_827 UNION SELECT pk, col0 FROM view_2_tab1_827
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 914 AND col1 < 446.23 ) AS tab1_827
----
38 values hashing to 1efa0cb3bf3974705e352fb091e420bf

query I rowsort label-2700-3
SELECT * FROM view_3_tab1_827
----
38 values hashing to 1efa0cb3bf3974705e352fb091e420bf

query I rowsort label-2700-3
SELECT pk FROM tab1 WHERE col0 < 914 AND col1 < 446.23
----
38 values hashing to 1efa0cb3bf3974705e352fb091e420bf

statement ok
DROP VIEW view_1_tab1_827

statement ok
DROP VIEW view_2_tab1_827

statement ok
DROP VIEW view_3_tab1_827

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_827') DROP VIEW view_1_tab2_827

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_827

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_827') DROP VIEW view_2_tab2_827

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_827

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_827') DROP VIEW view_3_tab2_827

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_827

statement ok
CREATE VIEW view_1_tab2_827 AS SELECT pk, col0 FROM tab2 WHERE col0 < 914 AND col1 < 446.23

statement ok
CREATE VIEW view_2_tab2_827 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 914 AND col1 < 446.23)

statement ok
CREATE VIEW view_3_tab2_827 AS SELECT pk FROM view_1_tab2_827

query II rowsort label-2700-1
SELECT pk, col0 FROM tab2 WHERE col0 < 914 AND col1 < 446.23
----
76 values hashing to a6872f0b3650d05141bc4180da32c615

query II rowsort label-2700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 914 AND col1 < 446.23)
----
124 values hashing to 38a38c75cf76e87abb3cd41a5f872f05

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab2_827
----
76 values hashing to a6872f0b3650d05141bc4180da32c615

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab2_827
----
124 values hashing to 38a38c75cf76e87abb3cd41a5f872f05

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 914 AND col1 < 446.23 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 914 AND col1 < 446.23)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_827 UNION ALL SELECT pk, col0 FROM view_2_tab2_827
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 914 AND col1 < 446.23 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 914 AND col1 < 446.23)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_827 UNION SELECT pk, col0 FROM view_2_tab2_827
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 914 AND col1 < 446.23 ) AS tab2_827
----
38 values hashing to 1efa0cb3bf3974705e352fb091e420bf

query I rowsort label-2700-3
SELECT * FROM view_3_tab2_827
----
38 values hashing to 1efa0cb3bf3974705e352fb091e420bf

query I rowsort label-2700-3
SELECT pk FROM tab2 WHERE col0 < 914 AND col1 < 446.23
----
38 values hashing to 1efa0cb3bf3974705e352fb091e420bf

statement ok
DROP VIEW view_1_tab2_827

statement ok
DROP VIEW view_2_tab2_827

statement ok
DROP VIEW view_3_tab2_827

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_827') DROP VIEW view_1_tab3_827

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_827

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_827') DROP VIEW view_2_tab3_827

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_827

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_827') DROP VIEW view_3_tab3_827

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_827

statement ok
CREATE VIEW view_1_tab3_827 AS SELECT pk, col0 FROM tab3 WHERE col0 < 914 AND col1 < 446.23

statement ok
CREATE VIEW view_2_tab3_827 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 914 AND col1 < 446.23)

statement ok
CREATE VIEW view_3_tab3_827 AS SELECT pk FROM view_1_tab3_827

query II rowsort label-2700-1
SELECT pk, col0 FROM tab3 WHERE col0 < 914 AND col1 < 446.23
----
76 values hashing to a6872f0b3650d05141bc4180da32c615

query II rowsort label-2700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 914 AND col1 < 446.23)
----
124 values hashing to 38a38c75cf76e87abb3cd41a5f872f05

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab3_827
----
76 values hashing to a6872f0b3650d05141bc4180da32c615

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab3_827
----
124 values hashing to 38a38c75cf76e87abb3cd41a5f872f05

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 914 AND col1 < 446.23 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 914 AND col1 < 446.23)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_827 UNION ALL SELECT pk, col0 FROM view_2_tab3_827
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 914 AND col1 < 446.23 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 914 AND col1 < 446.23)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_827 UNION SELECT pk, col0 FROM view_2_tab3_827
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 914 AND col1 < 446.23 ) AS tab3_827
----
38 values hashing to 1efa0cb3bf3974705e352fb091e420bf

query I rowsort label-2700-3
SELECT * FROM view_3_tab3_827
----
38 values hashing to 1efa0cb3bf3974705e352fb091e420bf

query I rowsort label-2700-3
SELECT pk FROM tab3 WHERE col0 < 914 AND col1 < 446.23
----
38 values hashing to 1efa0cb3bf3974705e352fb091e420bf

statement ok
DROP VIEW view_1_tab3_827

statement ok
DROP VIEW view_2_tab3_827

statement ok
DROP VIEW view_3_tab3_827

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_827') DROP VIEW view_1_tab4_827

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_827

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_827') DROP VIEW view_2_tab4_827

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_827

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_827') DROP VIEW view_3_tab4_827

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_827

statement ok
CREATE VIEW view_1_tab4_827 AS SELECT pk, col0 FROM tab4 WHERE col0 < 914 AND col1 < 446.23

statement ok
CREATE VIEW view_2_tab4_827 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 914 AND col1 < 446.23)

statement ok
CREATE VIEW view_3_tab4_827 AS SELECT pk FROM view_1_tab4_827

query II rowsort label-2700-1
SELECT pk, col0 FROM tab4 WHERE col0 < 914 AND col1 < 446.23
----
76 values hashing to a6872f0b3650d05141bc4180da32c615

query II rowsort label-2700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 914 AND col1 < 446.23)
----
124 values hashing to 38a38c75cf76e87abb3cd41a5f872f05

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab4_827
----
76 values hashing to a6872f0b3650d05141bc4180da32c615

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab4_827
----
124 values hashing to 38a38c75cf76e87abb3cd41a5f872f05

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 914 AND col1 < 446.23 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 914 AND col1 < 446.23)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_827 UNION ALL SELECT pk, col0 FROM view_2_tab4_827
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 914 AND col1 < 446.23 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 914 AND col1 < 446.23)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_827 UNION SELECT pk, col0 FROM view_2_tab4_827
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 914 AND col1 < 446.23 ) AS tab4_827
----
38 values hashing to 1efa0cb3bf3974705e352fb091e420bf

query I rowsort label-2700-3
SELECT * FROM view_3_tab4_827
----
38 values hashing to 1efa0cb3bf3974705e352fb091e420bf

query I rowsort label-2700-3
SELECT pk FROM tab4 WHERE col0 < 914 AND col1 < 446.23
----
38 values hashing to 1efa0cb3bf3974705e352fb091e420bf

statement ok
DROP VIEW view_1_tab4_827

statement ok
DROP VIEW view_2_tab4_827

statement ok
DROP VIEW view_3_tab4_827

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_828') DROP VIEW view_1_tab0_828

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_828

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_828') DROP VIEW view_2_tab0_828

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_828

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_828') DROP VIEW view_3_tab0_828

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_828

statement ok
CREATE VIEW view_1_tab0_828 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 536 OR col3 = 933

statement ok
CREATE VIEW view_2_tab0_828 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 536 OR col3 = 933)

statement ok
CREATE VIEW view_3_tab0_828 AS SELECT pk FROM view_1_tab0_828

query II rowsort label-2800-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 536 OR col3 = 933
----
96 values hashing to 4157562aa76429595ef142171c45a2b8

query II rowsort label-2800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 536 OR col3 = 933)
----
104 values hashing to e6959da18e005d558194df3b1efe7ba9

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab0_828
----
96 values hashing to 4157562aa76429595ef142171c45a2b8

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab0_828
----
104 values hashing to e6959da18e005d558194df3b1efe7ba9

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 536 OR col3 = 933 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 536 OR col3 = 933)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_828 UNION ALL SELECT pk, col0 FROM view_2_tab0_828
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 536 OR col3 = 933 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 536 OR col3 = 933)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_828 UNION SELECT pk, col0 FROM view_2_tab0_828
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 536 OR col3 = 933 ) AS tab0_828
----
48 values hashing to 3ec2314c54f090ac49573e2e0cefc2d8

query I rowsort label-2800-3
SELECT * FROM view_3_tab0_828
----
48 values hashing to 3ec2314c54f090ac49573e2e0cefc2d8

query I rowsort label-2800-3
SELECT pk FROM tab0 WHERE col0 <= 536 OR col3 = 933
----
48 values hashing to 3ec2314c54f090ac49573e2e0cefc2d8

statement ok
DROP VIEW view_1_tab0_828

statement ok
DROP VIEW view_2_tab0_828

statement ok
DROP VIEW view_3_tab0_828

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_828') DROP VIEW view_1_tab1_828

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_828

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_828') DROP VIEW view_2_tab1_828

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_828

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_828') DROP VIEW view_3_tab1_828

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_828

statement ok
CREATE VIEW view_1_tab1_828 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 536 OR col3 = 933

statement ok
CREATE VIEW view_2_tab1_828 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 536 OR col3 = 933)

statement ok
CREATE VIEW view_3_tab1_828 AS SELECT pk FROM view_1_tab1_828

query II rowsort label-2800-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 536 OR col3 = 933
----
96 values hashing to 4157562aa76429595ef142171c45a2b8

query II rowsort label-2800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 536 OR col3 = 933)
----
104 values hashing to e6959da18e005d558194df3b1efe7ba9

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab1_828
----
96 values hashing to 4157562aa76429595ef142171c45a2b8

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab1_828
----
104 values hashing to e6959da18e005d558194df3b1efe7ba9

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 536 OR col3 = 933 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 536 OR col3 = 933)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_828 UNION ALL SELECT pk, col0 FROM view_2_tab1_828
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 536 OR col3 = 933 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 536 OR col3 = 933)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_828 UNION SELECT pk, col0 FROM view_2_tab1_828
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 536 OR col3 = 933 ) AS tab1_828
----
48 values hashing to 3ec2314c54f090ac49573e2e0cefc2d8

query I rowsort label-2800-3
SELECT * FROM view_3_tab1_828
----
48 values hashing to 3ec2314c54f090ac49573e2e0cefc2d8

query I rowsort label-2800-3
SELECT pk FROM tab1 WHERE col0 <= 536 OR col3 = 933
----
48 values hashing to 3ec2314c54f090ac49573e2e0cefc2d8

statement ok
DROP VIEW view_1_tab1_828

statement ok
DROP VIEW view_2_tab1_828

statement ok
DROP VIEW view_3_tab1_828

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_828') DROP VIEW view_1_tab2_828

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_828

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_828') DROP VIEW view_2_tab2_828

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_828

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_828') DROP VIEW view_3_tab2_828

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_828

statement ok
CREATE VIEW view_1_tab2_828 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 536 OR col3 = 933

statement ok
CREATE VIEW view_2_tab2_828 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 536 OR col3 = 933)

statement ok
CREATE VIEW view_3_tab2_828 AS SELECT pk FROM view_1_tab2_828

query II rowsort label-2800-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 536 OR col3 = 933
----
96 values hashing to 4157562aa76429595ef142171c45a2b8

query II rowsort label-2800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 536 OR col3 = 933)
----
104 values hashing to e6959da18e005d558194df3b1efe7ba9

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab2_828
----
96 values hashing to 4157562aa76429595ef142171c45a2b8

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab2_828
----
104 values hashing to e6959da18e005d558194df3b1efe7ba9

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 536 OR col3 = 933 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 536 OR col3 = 933)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_828 UNION ALL SELECT pk, col0 FROM view_2_tab2_828
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 536 OR col3 = 933 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 536 OR col3 = 933)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_828 UNION SELECT pk, col0 FROM view_2_tab2_828
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 536 OR col3 = 933 ) AS tab2_828
----
48 values hashing to 3ec2314c54f090ac49573e2e0cefc2d8

query I rowsort label-2800-3
SELECT * FROM view_3_tab2_828
----
48 values hashing to 3ec2314c54f090ac49573e2e0cefc2d8

query I rowsort label-2800-3
SELECT pk FROM tab2 WHERE col0 <= 536 OR col3 = 933
----
48 values hashing to 3ec2314c54f090ac49573e2e0cefc2d8

statement ok
DROP VIEW view_1_tab2_828

statement ok
DROP VIEW view_2_tab2_828

statement ok
DROP VIEW view_3_tab2_828

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_828') DROP VIEW view_1_tab3_828

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_828

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_828') DROP VIEW view_2_tab3_828

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_828

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_828') DROP VIEW view_3_tab3_828

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_828

statement ok
CREATE VIEW view_1_tab3_828 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 536 OR col3 = 933

statement ok
CREATE VIEW view_2_tab3_828 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 536 OR col3 = 933)

statement ok
CREATE VIEW view_3_tab3_828 AS SELECT pk FROM view_1_tab3_828

query II rowsort label-2800-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 536 OR col3 = 933
----
96 values hashing to 4157562aa76429595ef142171c45a2b8

query II rowsort label-2800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 536 OR col3 = 933)
----
104 values hashing to e6959da18e005d558194df3b1efe7ba9

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab3_828
----
96 values hashing to 4157562aa76429595ef142171c45a2b8

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab3_828
----
104 values hashing to e6959da18e005d558194df3b1efe7ba9

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 536 OR col3 = 933 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 536 OR col3 = 933)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_828 UNION ALL SELECT pk, col0 FROM view_2_tab3_828
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 536 OR col3 = 933 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 536 OR col3 = 933)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_828 UNION SELECT pk, col0 FROM view_2_tab3_828
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 536 OR col3 = 933 ) AS tab3_828
----
48 values hashing to 3ec2314c54f090ac49573e2e0cefc2d8

query I rowsort label-2800-3
SELECT * FROM view_3_tab3_828
----
48 values hashing to 3ec2314c54f090ac49573e2e0cefc2d8

query I rowsort label-2800-3
SELECT pk FROM tab3 WHERE col0 <= 536 OR col3 = 933
----
48 values hashing to 3ec2314c54f090ac49573e2e0cefc2d8

statement ok
DROP VIEW view_1_tab3_828

statement ok
DROP VIEW view_2_tab3_828

statement ok
DROP VIEW view_3_tab3_828

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_828') DROP VIEW view_1_tab4_828

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_828

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_828') DROP VIEW view_2_tab4_828

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_828

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_828') DROP VIEW view_3_tab4_828

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_828

statement ok
CREATE VIEW view_1_tab4_828 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 536 OR col3 = 933

statement ok
CREATE VIEW view_2_tab4_828 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 536 OR col3 = 933)

statement ok
CREATE VIEW view_3_tab4_828 AS SELECT pk FROM view_1_tab4_828

query II rowsort label-2800-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 536 OR col3 = 933
----
96 values hashing to 4157562aa76429595ef142171c45a2b8

query II rowsort label-2800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 536 OR col3 = 933)
----
104 values hashing to e6959da18e005d558194df3b1efe7ba9

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab4_828
----
96 values hashing to 4157562aa76429595ef142171c45a2b8

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab4_828
----
104 values hashing to e6959da18e005d558194df3b1efe7ba9

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 536 OR col3 = 933 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 536 OR col3 = 933)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_828 UNION ALL SELECT pk, col0 FROM view_2_tab4_828
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 536 OR col3 = 933 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 536 OR col3 = 933)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_828 UNION SELECT pk, col0 FROM view_2_tab4_828
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 536 OR col3 = 933 ) AS tab4_828
----
48 values hashing to 3ec2314c54f090ac49573e2e0cefc2d8

query I rowsort label-2800-3
SELECT * FROM view_3_tab4_828
----
48 values hashing to 3ec2314c54f090ac49573e2e0cefc2d8

query I rowsort label-2800-3
SELECT pk FROM tab4 WHERE col0 <= 536 OR col3 = 933
----
48 values hashing to 3ec2314c54f090ac49573e2e0cefc2d8

statement ok
DROP VIEW view_1_tab4_828

statement ok
DROP VIEW view_2_tab4_828

statement ok
DROP VIEW view_3_tab4_828

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_829') DROP VIEW view_1_tab0_829

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_829

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_829') DROP VIEW view_2_tab0_829

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_829

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_829') DROP VIEW view_3_tab0_829

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_829

statement ok
CREATE VIEW view_1_tab0_829 AS SELECT pk, col0 FROM tab0 WHERE col0 > 41

statement ok
CREATE VIEW view_2_tab0_829 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 41)

statement ok
CREATE VIEW view_3_tab0_829 AS SELECT pk FROM view_1_tab0_829

query II rowsort label-2900-1
SELECT pk, col0 FROM tab0 WHERE col0 > 41
----
190 values hashing to 82f23eba0af8b14104484e9500f7bf9b

query II rowsort label-2900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 41)
----
10 values hashing to 8aaa04e46b94661ce9d072f550738a59

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab0_829
----
190 values hashing to 82f23eba0af8b14104484e9500f7bf9b

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab0_829
----
10 values hashing to 8aaa04e46b94661ce9d072f550738a59

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 41 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 41)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_829 UNION ALL SELECT pk, col0 FROM view_2_tab0_829
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 41 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 41)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_829 UNION SELECT pk, col0 FROM view_2_tab0_829
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 41 ) AS tab0_829
----
95 values hashing to 687246e8b77dc53bda1c9f1b957edd50

query I rowsort label-2900-3
SELECT * FROM view_3_tab0_829
----
95 values hashing to 687246e8b77dc53bda1c9f1b957edd50

query I rowsort label-2900-3
SELECT pk FROM tab0 WHERE col0 > 41
----
95 values hashing to 687246e8b77dc53bda1c9f1b957edd50

statement ok
DROP VIEW view_1_tab0_829

statement ok
DROP VIEW view_2_tab0_829

statement ok
DROP VIEW view_3_tab0_829

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_829') DROP VIEW view_1_tab1_829

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_829

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_829') DROP VIEW view_2_tab1_829

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_829

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_829') DROP VIEW view_3_tab1_829

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_829

statement ok
CREATE VIEW view_1_tab1_829 AS SELECT pk, col0 FROM tab1 WHERE col0 > 41

statement ok
CREATE VIEW view_2_tab1_829 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 41)

statement ok
CREATE VIEW view_3_tab1_829 AS SELECT pk FROM view_1_tab1_829

query II rowsort label-2900-1
SELECT pk, col0 FROM tab1 WHERE col0 > 41
----
190 values hashing to 82f23eba0af8b14104484e9500f7bf9b

query II rowsort label-2900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 41)
----
10 values hashing to 8aaa04e46b94661ce9d072f550738a59

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab1_829
----
190 values hashing to 82f23eba0af8b14104484e9500f7bf9b

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab1_829
----
10 values hashing to 8aaa04e46b94661ce9d072f550738a59

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 41 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 41)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_829 UNION ALL SELECT pk, col0 FROM view_2_tab1_829
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 41 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 41)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_829 UNION SELECT pk, col0 FROM view_2_tab1_829
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 41 ) AS tab1_829
----
95 values hashing to 687246e8b77dc53bda1c9f1b957edd50

query I rowsort label-2900-3
SELECT * FROM view_3_tab1_829
----
95 values hashing to 687246e8b77dc53bda1c9f1b957edd50

query I rowsort label-2900-3
SELECT pk FROM tab1 WHERE col0 > 41
----
95 values hashing to 687246e8b77dc53bda1c9f1b957edd50

statement ok
DROP VIEW view_1_tab1_829

statement ok
DROP VIEW view_2_tab1_829

statement ok
DROP VIEW view_3_tab1_829

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_829') DROP VIEW view_1_tab2_829

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_829

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_829') DROP VIEW view_2_tab2_829

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_829

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_829') DROP VIEW view_3_tab2_829

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_829

statement ok
CREATE VIEW view_1_tab2_829 AS SELECT pk, col0 FROM tab2 WHERE col0 > 41

statement ok
CREATE VIEW view_2_tab2_829 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 41)

statement ok
CREATE VIEW view_3_tab2_829 AS SELECT pk FROM view_1_tab2_829

query II rowsort label-2900-1
SELECT pk, col0 FROM tab2 WHERE col0 > 41
----
190 values hashing to 82f23eba0af8b14104484e9500f7bf9b

query II rowsort label-2900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 41)
----
10 values hashing to 8aaa04e46b94661ce9d072f550738a59

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab2_829
----
190 values hashing to 82f23eba0af8b14104484e9500f7bf9b

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab2_829
----
10 values hashing to 8aaa04e46b94661ce9d072f550738a59

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 41 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 41)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_829 UNION ALL SELECT pk, col0 FROM view_2_tab2_829
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 41 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 41)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_829 UNION SELECT pk, col0 FROM view_2_tab2_829
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 41 ) AS tab2_829
----
95 values hashing to 687246e8b77dc53bda1c9f1b957edd50

query I rowsort label-2900-3
SELECT * FROM view_3_tab2_829
----
95 values hashing to 687246e8b77dc53bda1c9f1b957edd50

query I rowsort label-2900-3
SELECT pk FROM tab2 WHERE col0 > 41
----
95 values hashing to 687246e8b77dc53bda1c9f1b957edd50

statement ok
DROP VIEW view_1_tab2_829

statement ok
DROP VIEW view_2_tab2_829

statement ok
DROP VIEW view_3_tab2_829

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_829') DROP VIEW view_1_tab3_829

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_829

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_829') DROP VIEW view_2_tab3_829

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_829

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_829') DROP VIEW view_3_tab3_829

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_829

statement ok
CREATE VIEW view_1_tab3_829 AS SELECT pk, col0 FROM tab3 WHERE col0 > 41

statement ok
CREATE VIEW view_2_tab3_829 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 41)

statement ok
CREATE VIEW view_3_tab3_829 AS SELECT pk FROM view_1_tab3_829

query II rowsort label-2900-1
SELECT pk, col0 FROM tab3 WHERE col0 > 41
----
190 values hashing to 82f23eba0af8b14104484e9500f7bf9b

query II rowsort label-2900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 41)
----
10 values hashing to 8aaa04e46b94661ce9d072f550738a59

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab3_829
----
190 values hashing to 82f23eba0af8b14104484e9500f7bf9b

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab3_829
----
10 values hashing to 8aaa04e46b94661ce9d072f550738a59

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 41 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 41)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_829 UNION ALL SELECT pk, col0 FROM view_2_tab3_829
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 41 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 41)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_829 UNION SELECT pk, col0 FROM view_2_tab3_829
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 41 ) AS tab3_829
----
95 values hashing to 687246e8b77dc53bda1c9f1b957edd50

query I rowsort label-2900-3
SELECT * FROM view_3_tab3_829
----
95 values hashing to 687246e8b77dc53bda1c9f1b957edd50

query I rowsort label-2900-3
SELECT pk FROM tab3 WHERE col0 > 41
----
95 values hashing to 687246e8b77dc53bda1c9f1b957edd50

statement ok
DROP VIEW view_1_tab3_829

statement ok
DROP VIEW view_2_tab3_829

statement ok
DROP VIEW view_3_tab3_829

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_829') DROP VIEW view_1_tab4_829

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_829

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_829') DROP VIEW view_2_tab4_829

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_829

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_829') DROP VIEW view_3_tab4_829

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_829

statement ok
CREATE VIEW view_1_tab4_829 AS SELECT pk, col0 FROM tab4 WHERE col0 > 41

statement ok
CREATE VIEW view_2_tab4_829 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 41)

statement ok
CREATE VIEW view_3_tab4_829 AS SELECT pk FROM view_1_tab4_829

query II rowsort label-2900-1
SELECT pk, col0 FROM tab4 WHERE col0 > 41
----
190 values hashing to 82f23eba0af8b14104484e9500f7bf9b

query II rowsort label-2900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 41)
----
10 values hashing to 8aaa04e46b94661ce9d072f550738a59

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab4_829
----
190 values hashing to 82f23eba0af8b14104484e9500f7bf9b

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab4_829
----
10 values hashing to 8aaa04e46b94661ce9d072f550738a59

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 41 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 41)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_829 UNION ALL SELECT pk, col0 FROM view_2_tab4_829
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 41 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 41)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_829 UNION SELECT pk, col0 FROM view_2_tab4_829
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 41 ) AS tab4_829
----
95 values hashing to 687246e8b77dc53bda1c9f1b957edd50

query I rowsort label-2900-3
SELECT * FROM view_3_tab4_829
----
95 values hashing to 687246e8b77dc53bda1c9f1b957edd50

query I rowsort label-2900-3
SELECT pk FROM tab4 WHERE col0 > 41
----
95 values hashing to 687246e8b77dc53bda1c9f1b957edd50

statement ok
DROP VIEW view_1_tab4_829

statement ok
DROP VIEW view_2_tab4_829

statement ok
DROP VIEW view_3_tab4_829

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_830') DROP VIEW view_1_tab0_830

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_830

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_830') DROP VIEW view_2_tab0_830

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_830

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_830') DROP VIEW view_3_tab0_830

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_830

statement ok
CREATE VIEW view_1_tab0_830 AS SELECT pk, col0 FROM tab0 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71)))

statement ok
CREATE VIEW view_2_tab0_830 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))

statement ok
CREATE VIEW view_3_tab0_830 AS SELECT pk FROM view_1_tab0_830

query II rowsort label-3000-1
SELECT pk, col0 FROM tab0 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71)))
----
44 values hashing to ac6fb2bd8d22fdac350c81ea57467018

query II rowsort label-3000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))
----
156 values hashing to 96c252fdf46be343bff9fd3ab3304514

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab0_830
----
44 values hashing to ac6fb2bd8d22fdac350c81ea57467018

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab0_830
----
156 values hashing to 96c252fdf46be343bff9fd3ab3304514

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_830 UNION ALL SELECT pk, col0 FROM view_2_tab0_830
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_830 UNION SELECT pk, col0 FROM view_2_tab0_830
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))) ) AS tab0_830
----
22 values hashing to 809b755e6f45574914469a78f8c078e5

query I rowsort label-3000-3
SELECT * FROM view_3_tab0_830
----
22 values hashing to 809b755e6f45574914469a78f8c078e5

query I rowsort label-3000-3
SELECT pk FROM tab0 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71)))
----
22 values hashing to 809b755e6f45574914469a78f8c078e5

statement ok
DROP VIEW view_1_tab0_830

statement ok
DROP VIEW view_2_tab0_830

statement ok
DROP VIEW view_3_tab0_830

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_830') DROP VIEW view_1_tab1_830

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_830

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_830') DROP VIEW view_2_tab1_830

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_830

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_830') DROP VIEW view_3_tab1_830

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_830

statement ok
CREATE VIEW view_1_tab1_830 AS SELECT pk, col0 FROM tab1 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71)))

statement ok
CREATE VIEW view_2_tab1_830 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))

statement ok
CREATE VIEW view_3_tab1_830 AS SELECT pk FROM view_1_tab1_830

query II rowsort label-3000-1
SELECT pk, col0 FROM tab1 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71)))
----
44 values hashing to ac6fb2bd8d22fdac350c81ea57467018

query II rowsort label-3000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))
----
156 values hashing to 96c252fdf46be343bff9fd3ab3304514

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab1_830
----
44 values hashing to ac6fb2bd8d22fdac350c81ea57467018

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab1_830
----
156 values hashing to 96c252fdf46be343bff9fd3ab3304514

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_830 UNION ALL SELECT pk, col0 FROM view_2_tab1_830
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_830 UNION SELECT pk, col0 FROM view_2_tab1_830
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))) ) AS tab1_830
----
22 values hashing to 809b755e6f45574914469a78f8c078e5

query I rowsort label-3000-3
SELECT * FROM view_3_tab1_830
----
22 values hashing to 809b755e6f45574914469a78f8c078e5

query I rowsort label-3000-3
SELECT pk FROM tab1 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71)))
----
22 values hashing to 809b755e6f45574914469a78f8c078e5

statement ok
DROP VIEW view_1_tab1_830

statement ok
DROP VIEW view_2_tab1_830

statement ok
DROP VIEW view_3_tab1_830

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_830') DROP VIEW view_1_tab2_830

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_830

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_830') DROP VIEW view_2_tab2_830

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_830

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_830') DROP VIEW view_3_tab2_830

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_830

statement ok
CREATE VIEW view_1_tab2_830 AS SELECT pk, col0 FROM tab2 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71)))

statement ok
CREATE VIEW view_2_tab2_830 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))

statement ok
CREATE VIEW view_3_tab2_830 AS SELECT pk FROM view_1_tab2_830

query II rowsort label-3000-1
SELECT pk, col0 FROM tab2 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71)))
----
44 values hashing to ac6fb2bd8d22fdac350c81ea57467018

query II rowsort label-3000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))
----
156 values hashing to 96c252fdf46be343bff9fd3ab3304514

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab2_830
----
44 values hashing to ac6fb2bd8d22fdac350c81ea57467018

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab2_830
----
156 values hashing to 96c252fdf46be343bff9fd3ab3304514

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_830 UNION ALL SELECT pk, col0 FROM view_2_tab2_830
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_830 UNION SELECT pk, col0 FROM view_2_tab2_830
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))) ) AS tab2_830
----
22 values hashing to 809b755e6f45574914469a78f8c078e5

query I rowsort label-3000-3
SELECT * FROM view_3_tab2_830
----
22 values hashing to 809b755e6f45574914469a78f8c078e5

query I rowsort label-3000-3
SELECT pk FROM tab2 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71)))
----
22 values hashing to 809b755e6f45574914469a78f8c078e5

statement ok
DROP VIEW view_1_tab2_830

statement ok
DROP VIEW view_2_tab2_830

statement ok
DROP VIEW view_3_tab2_830

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_830') DROP VIEW view_1_tab3_830

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_830

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_830') DROP VIEW view_2_tab3_830

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_830

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_830') DROP VIEW view_3_tab3_830

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_830

statement ok
CREATE VIEW view_1_tab3_830 AS SELECT pk, col0 FROM tab3 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71)))

statement ok
CREATE VIEW view_2_tab3_830 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))

statement ok
CREATE VIEW view_3_tab3_830 AS SELECT pk FROM view_1_tab3_830

query II rowsort label-3000-1
SELECT pk, col0 FROM tab3 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71)))
----
44 values hashing to ac6fb2bd8d22fdac350c81ea57467018

query II rowsort label-3000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))
----
156 values hashing to 96c252fdf46be343bff9fd3ab3304514

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab3_830
----
44 values hashing to ac6fb2bd8d22fdac350c81ea57467018

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab3_830
----
156 values hashing to 96c252fdf46be343bff9fd3ab3304514

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_830 UNION ALL SELECT pk, col0 FROM view_2_tab3_830
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_830 UNION SELECT pk, col0 FROM view_2_tab3_830
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))) ) AS tab3_830
----
22 values hashing to 809b755e6f45574914469a78f8c078e5

query I rowsort label-3000-3
SELECT * FROM view_3_tab3_830
----
22 values hashing to 809b755e6f45574914469a78f8c078e5

query I rowsort label-3000-3
SELECT pk FROM tab3 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71)))
----
22 values hashing to 809b755e6f45574914469a78f8c078e5

statement ok
DROP VIEW view_1_tab3_830

statement ok
DROP VIEW view_2_tab3_830

statement ok
DROP VIEW view_3_tab3_830

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_830') DROP VIEW view_1_tab4_830

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_830

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_830') DROP VIEW view_2_tab4_830

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_830

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_830') DROP VIEW view_3_tab4_830

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_830

statement ok
CREATE VIEW view_1_tab4_830 AS SELECT pk, col0 FROM tab4 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71)))

statement ok
CREATE VIEW view_2_tab4_830 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))

statement ok
CREATE VIEW view_3_tab4_830 AS SELECT pk FROM view_1_tab4_830

query II rowsort label-3000-1
SELECT pk, col0 FROM tab4 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71)))
----
44 values hashing to ac6fb2bd8d22fdac350c81ea57467018

query II rowsort label-3000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))
----
156 values hashing to 96c252fdf46be343bff9fd3ab3304514

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab4_830
----
44 values hashing to ac6fb2bd8d22fdac350c81ea57467018

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab4_830
----
156 values hashing to 96c252fdf46be343bff9fd3ab3304514

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_830 UNION ALL SELECT pk, col0 FROM view_2_tab4_830
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_830 UNION SELECT pk, col0 FROM view_2_tab4_830
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71))) ) AS tab4_830
----
22 values hashing to 809b755e6f45574914469a78f8c078e5

query I rowsort label-3000-3
SELECT * FROM view_3_tab4_830
----
22 values hashing to 809b755e6f45574914469a78f8c078e5

query I rowsort label-3000-3
SELECT pk FROM tab4 WHERE col3 > 556 AND (col1 >= 664.28) OR (col3 < 788 AND (col4 IN (814.71)))
----
22 values hashing to 809b755e6f45574914469a78f8c078e5

statement ok
DROP VIEW view_1_tab4_830

statement ok
DROP VIEW view_2_tab4_830

statement ok
DROP VIEW view_3_tab4_830

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_831') DROP VIEW view_1_tab0_831

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_831

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_831') DROP VIEW view_2_tab0_831

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_831

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_831') DROP VIEW view_3_tab0_831

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_831

statement ok
CREATE VIEW view_1_tab0_831 AS SELECT pk, col0 FROM tab0 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574))

statement ok
CREATE VIEW view_2_tab0_831 AS SELECT pk, col0 FROM tab0 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))

statement ok
CREATE VIEW view_3_tab0_831 AS SELECT pk FROM view_1_tab0_831

query II rowsort label-3100-1
SELECT pk, col0 FROM tab0 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574))
----
108 values hashing to 86f5edd372725c81c19853f036c174eb

query II rowsort label-3100-2
SELECT pk, col0 FROM tab0 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))
----
92 values hashing to 148d3457011dbf3d5a9dbaaa5277b6a3

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab0_831
----
108 values hashing to 86f5edd372725c81c19853f036c174eb

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab0_831
----
92 values hashing to 148d3457011dbf3d5a9dbaaa5277b6a3

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_831 UNION ALL SELECT pk, col0 FROM view_2_tab0_831
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_831 UNION SELECT pk, col0 FROM view_2_tab0_831
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)) ) AS tab0_831
----
54 values hashing to 4139fe94af52a86c1002ef3732f9946f

query I rowsort label-3100-3
SELECT * FROM view_3_tab0_831
----
54 values hashing to 4139fe94af52a86c1002ef3732f9946f

query I rowsort label-3100-3
SELECT pk FROM tab0 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574))
----
54 values hashing to 4139fe94af52a86c1002ef3732f9946f

statement ok
DROP VIEW view_1_tab0_831

statement ok
DROP VIEW view_2_tab0_831

statement ok
DROP VIEW view_3_tab0_831

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_831') DROP VIEW view_1_tab1_831

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_831

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_831') DROP VIEW view_2_tab1_831

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_831

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_831') DROP VIEW view_3_tab1_831

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_831

statement ok
CREATE VIEW view_1_tab1_831 AS SELECT pk, col0 FROM tab1 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574))

statement ok
CREATE VIEW view_2_tab1_831 AS SELECT pk, col0 FROM tab1 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))

statement ok
CREATE VIEW view_3_tab1_831 AS SELECT pk FROM view_1_tab1_831

query II rowsort label-3100-1
SELECT pk, col0 FROM tab1 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574))
----
108 values hashing to 86f5edd372725c81c19853f036c174eb

query II rowsort label-3100-2
SELECT pk, col0 FROM tab1 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))
----
92 values hashing to 148d3457011dbf3d5a9dbaaa5277b6a3

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab1_831
----
108 values hashing to 86f5edd372725c81c19853f036c174eb

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab1_831
----
92 values hashing to 148d3457011dbf3d5a9dbaaa5277b6a3

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_831 UNION ALL SELECT pk, col0 FROM view_2_tab1_831
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_831 UNION SELECT pk, col0 FROM view_2_tab1_831
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)) ) AS tab1_831
----
54 values hashing to 4139fe94af52a86c1002ef3732f9946f

query I rowsort label-3100-3
SELECT * FROM view_3_tab1_831
----
54 values hashing to 4139fe94af52a86c1002ef3732f9946f

query I rowsort label-3100-3
SELECT pk FROM tab1 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574))
----
54 values hashing to 4139fe94af52a86c1002ef3732f9946f

statement ok
DROP VIEW view_1_tab1_831

statement ok
DROP VIEW view_2_tab1_831

statement ok
DROP VIEW view_3_tab1_831

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_831') DROP VIEW view_1_tab2_831

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_831

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_831') DROP VIEW view_2_tab2_831

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_831

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_831') DROP VIEW view_3_tab2_831

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_831

statement ok
CREATE VIEW view_1_tab2_831 AS SELECT pk, col0 FROM tab2 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574))

statement ok
CREATE VIEW view_2_tab2_831 AS SELECT pk, col0 FROM tab2 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))

statement ok
CREATE VIEW view_3_tab2_831 AS SELECT pk FROM view_1_tab2_831

query II rowsort label-3100-1
SELECT pk, col0 FROM tab2 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574))
----
108 values hashing to 86f5edd372725c81c19853f036c174eb

query II rowsort label-3100-2
SELECT pk, col0 FROM tab2 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))
----
92 values hashing to 148d3457011dbf3d5a9dbaaa5277b6a3

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab2_831
----
108 values hashing to 86f5edd372725c81c19853f036c174eb

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab2_831
----
92 values hashing to 148d3457011dbf3d5a9dbaaa5277b6a3

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_831 UNION ALL SELECT pk, col0 FROM view_2_tab2_831
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_831 UNION SELECT pk, col0 FROM view_2_tab2_831
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)) ) AS tab2_831
----
54 values hashing to 4139fe94af52a86c1002ef3732f9946f

query I rowsort label-3100-3
SELECT * FROM view_3_tab2_831
----
54 values hashing to 4139fe94af52a86c1002ef3732f9946f

query I rowsort label-3100-3
SELECT pk FROM tab2 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574))
----
54 values hashing to 4139fe94af52a86c1002ef3732f9946f

statement ok
DROP VIEW view_1_tab2_831

statement ok
DROP VIEW view_2_tab2_831

statement ok
DROP VIEW view_3_tab2_831

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_831') DROP VIEW view_1_tab3_831

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_831

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_831') DROP VIEW view_2_tab3_831

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_831

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_831') DROP VIEW view_3_tab3_831

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_831

statement ok
CREATE VIEW view_1_tab3_831 AS SELECT pk, col0 FROM tab3 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574))

statement ok
CREATE VIEW view_2_tab3_831 AS SELECT pk, col0 FROM tab3 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))

statement ok
CREATE VIEW view_3_tab3_831 AS SELECT pk FROM view_1_tab3_831

query II rowsort label-3100-1
SELECT pk, col0 FROM tab3 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574))
----
108 values hashing to 86f5edd372725c81c19853f036c174eb

query II rowsort label-3100-2
SELECT pk, col0 FROM tab3 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))
----
92 values hashing to 148d3457011dbf3d5a9dbaaa5277b6a3

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab3_831
----
108 values hashing to 86f5edd372725c81c19853f036c174eb

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab3_831
----
92 values hashing to 148d3457011dbf3d5a9dbaaa5277b6a3

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_831 UNION ALL SELECT pk, col0 FROM view_2_tab3_831
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_831 UNION SELECT pk, col0 FROM view_2_tab3_831
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)) ) AS tab3_831
----
54 values hashing to 4139fe94af52a86c1002ef3732f9946f

query I rowsort label-3100-3
SELECT * FROM view_3_tab3_831
----
54 values hashing to 4139fe94af52a86c1002ef3732f9946f

query I rowsort label-3100-3
SELECT pk FROM tab3 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574))
----
54 values hashing to 4139fe94af52a86c1002ef3732f9946f

statement ok
DROP VIEW view_1_tab3_831

statement ok
DROP VIEW view_2_tab3_831

statement ok
DROP VIEW view_3_tab3_831

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_831') DROP VIEW view_1_tab4_831

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_831

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_831') DROP VIEW view_2_tab4_831

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_831

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_831') DROP VIEW view_3_tab4_831

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_831

statement ok
CREATE VIEW view_1_tab4_831 AS SELECT pk, col0 FROM tab4 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574))

statement ok
CREATE VIEW view_2_tab4_831 AS SELECT pk, col0 FROM tab4 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))

statement ok
CREATE VIEW view_3_tab4_831 AS SELECT pk FROM view_1_tab4_831

query II rowsort label-3100-1
SELECT pk, col0 FROM tab4 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574))
----
108 values hashing to 86f5edd372725c81c19853f036c174eb

query II rowsort label-3100-2
SELECT pk, col0 FROM tab4 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))
----
92 values hashing to 148d3457011dbf3d5a9dbaaa5277b6a3

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab4_831
----
108 values hashing to 86f5edd372725c81c19853f036c174eb

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab4_831
----
92 values hashing to 148d3457011dbf3d5a9dbaaa5277b6a3

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_831 UNION ALL SELECT pk, col0 FROM view_2_tab4_831
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_831 UNION SELECT pk, col0 FROM view_2_tab4_831
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574)) ) AS tab4_831
----
54 values hashing to 4139fe94af52a86c1002ef3732f9946f

query I rowsort label-3100-3
SELECT * FROM view_3_tab4_831
----
54 values hashing to 4139fe94af52a86c1002ef3732f9946f

query I rowsort label-3100-3
SELECT pk FROM tab4 WHERE ((((col0 IS NULL AND col3 >= 781)))) OR ((col3 > 562 AND col3 < 584) OR (col0 < 574))
----
54 values hashing to 4139fe94af52a86c1002ef3732f9946f

statement ok
DROP VIEW view_1_tab4_831

statement ok
DROP VIEW view_2_tab4_831

statement ok
DROP VIEW view_3_tab4_831

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_832') DROP VIEW view_1_tab0_832

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_832

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_832') DROP VIEW view_2_tab0_832

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_832

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_832') DROP VIEW view_3_tab0_832

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_832

statement ok
CREATE VIEW view_1_tab0_832 AS SELECT pk, col0 FROM tab0 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab0_832 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab0_832 AS SELECT pk FROM view_1_tab0_832

query II rowsort label-3200-1
SELECT pk, col0 FROM tab0 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL
----
164 values hashing to 2548bbf8578b5a47ccef737c18b1c451

query II rowsort label-3200-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)
----
36 values hashing to 096158f6f1d237371328535dc771d02b

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab0_832
----
164 values hashing to 2548bbf8578b5a47ccef737c18b1c451

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab0_832
----
36 values hashing to 096158f6f1d237371328535dc771d02b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_832 UNION ALL SELECT pk, col0 FROM view_2_tab0_832
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_832 UNION SELECT pk, col0 FROM view_2_tab0_832
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL ) AS tab0_832
----
82 values hashing to 49826a80d63cbbacd29ef6d0e1df30f1

query I rowsort label-3200-3
SELECT * FROM view_3_tab0_832
----
82 values hashing to 49826a80d63cbbacd29ef6d0e1df30f1

query I rowsort label-3200-3
SELECT pk FROM tab0 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL
----
82 values hashing to 49826a80d63cbbacd29ef6d0e1df30f1

statement ok
DROP VIEW view_1_tab0_832

statement ok
DROP VIEW view_2_tab0_832

statement ok
DROP VIEW view_3_tab0_832

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_832') DROP VIEW view_1_tab1_832

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_832

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_832') DROP VIEW view_2_tab1_832

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_832

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_832') DROP VIEW view_3_tab1_832

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_832

statement ok
CREATE VIEW view_1_tab1_832 AS SELECT pk, col0 FROM tab1 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab1_832 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab1_832 AS SELECT pk FROM view_1_tab1_832

query II rowsort label-3200-1
SELECT pk, col0 FROM tab1 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL
----
164 values hashing to 2548bbf8578b5a47ccef737c18b1c451

query II rowsort label-3200-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)
----
36 values hashing to 096158f6f1d237371328535dc771d02b

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab1_832
----
164 values hashing to 2548bbf8578b5a47ccef737c18b1c451

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab1_832
----
36 values hashing to 096158f6f1d237371328535dc771d02b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_832 UNION ALL SELECT pk, col0 FROM view_2_tab1_832
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_832 UNION SELECT pk, col0 FROM view_2_tab1_832
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL ) AS tab1_832
----
82 values hashing to 49826a80d63cbbacd29ef6d0e1df30f1

query I rowsort label-3200-3
SELECT * FROM view_3_tab1_832
----
82 values hashing to 49826a80d63cbbacd29ef6d0e1df30f1

query I rowsort label-3200-3
SELECT pk FROM tab1 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL
----
82 values hashing to 49826a80d63cbbacd29ef6d0e1df30f1

statement ok
DROP VIEW view_1_tab1_832

statement ok
DROP VIEW view_2_tab1_832

statement ok
DROP VIEW view_3_tab1_832

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_832') DROP VIEW view_1_tab2_832

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_832

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_832') DROP VIEW view_2_tab2_832

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_832

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_832') DROP VIEW view_3_tab2_832

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_832

statement ok
CREATE VIEW view_1_tab2_832 AS SELECT pk, col0 FROM tab2 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab2_832 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab2_832 AS SELECT pk FROM view_1_tab2_832

query II rowsort label-3200-1
SELECT pk, col0 FROM tab2 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL
----
164 values hashing to 2548bbf8578b5a47ccef737c18b1c451

query II rowsort label-3200-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)
----
36 values hashing to 096158f6f1d237371328535dc771d02b

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab2_832
----
164 values hashing to 2548bbf8578b5a47ccef737c18b1c451

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab2_832
----
36 values hashing to 096158f6f1d237371328535dc771d02b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_832 UNION ALL SELECT pk, col0 FROM view_2_tab2_832
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_832 UNION SELECT pk, col0 FROM view_2_tab2_832
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL ) AS tab2_832
----
82 values hashing to 49826a80d63cbbacd29ef6d0e1df30f1

query I rowsort label-3200-3
SELECT * FROM view_3_tab2_832
----
82 values hashing to 49826a80d63cbbacd29ef6d0e1df30f1

query I rowsort label-3200-3
SELECT pk FROM tab2 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL
----
82 values hashing to 49826a80d63cbbacd29ef6d0e1df30f1

statement ok
DROP VIEW view_1_tab2_832

statement ok
DROP VIEW view_2_tab2_832

statement ok
DROP VIEW view_3_tab2_832

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_832') DROP VIEW view_1_tab3_832

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_832

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_832') DROP VIEW view_2_tab3_832

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_832

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_832') DROP VIEW view_3_tab3_832

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_832

statement ok
CREATE VIEW view_1_tab3_832 AS SELECT pk, col0 FROM tab3 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab3_832 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab3_832 AS SELECT pk FROM view_1_tab3_832

query II rowsort label-3200-1
SELECT pk, col0 FROM tab3 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL
----
164 values hashing to 2548bbf8578b5a47ccef737c18b1c451

query II rowsort label-3200-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)
----
36 values hashing to 096158f6f1d237371328535dc771d02b

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab3_832
----
164 values hashing to 2548bbf8578b5a47ccef737c18b1c451

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab3_832
----
36 values hashing to 096158f6f1d237371328535dc771d02b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_832 UNION ALL SELECT pk, col0 FROM view_2_tab3_832
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_832 UNION SELECT pk, col0 FROM view_2_tab3_832
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL ) AS tab3_832
----
82 values hashing to 49826a80d63cbbacd29ef6d0e1df30f1

query I rowsort label-3200-3
SELECT * FROM view_3_tab3_832
----
82 values hashing to 49826a80d63cbbacd29ef6d0e1df30f1

query I rowsort label-3200-3
SELECT pk FROM tab3 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL
----
82 values hashing to 49826a80d63cbbacd29ef6d0e1df30f1

statement ok
DROP VIEW view_1_tab3_832

statement ok
DROP VIEW view_2_tab3_832

statement ok
DROP VIEW view_3_tab3_832

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_832') DROP VIEW view_1_tab4_832

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_832

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_832') DROP VIEW view_2_tab4_832

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_832

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_832') DROP VIEW view_3_tab4_832

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_832

statement ok
CREATE VIEW view_1_tab4_832 AS SELECT pk, col0 FROM tab4 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab4_832 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab4_832 AS SELECT pk FROM view_1_tab4_832

query II rowsort label-3200-1
SELECT pk, col0 FROM tab4 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL
----
164 values hashing to 2548bbf8578b5a47ccef737c18b1c451

query II rowsort label-3200-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)
----
36 values hashing to 096158f6f1d237371328535dc771d02b

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab4_832
----
164 values hashing to 2548bbf8578b5a47ccef737c18b1c451

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab4_832
----
36 values hashing to 096158f6f1d237371328535dc771d02b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_832 UNION ALL SELECT pk, col0 FROM view_2_tab4_832
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_832 UNION SELECT pk, col0 FROM view_2_tab4_832
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL ) AS tab4_832
----
82 values hashing to 49826a80d63cbbacd29ef6d0e1df30f1

query I rowsort label-3200-3
SELECT * FROM view_3_tab4_832
----
82 values hashing to 49826a80d63cbbacd29ef6d0e1df30f1

query I rowsort label-3200-3
SELECT pk FROM tab4 WHERE ((col3 <= 742) OR ((((col0 > 222) AND col4 >= 520.84 OR (col4 > 737.84))))) OR col3 IS NULL
----
82 values hashing to 49826a80d63cbbacd29ef6d0e1df30f1

statement ok
DROP VIEW view_1_tab4_832

statement ok
DROP VIEW view_2_tab4_832

statement ok
DROP VIEW view_3_tab4_832

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_833') DROP VIEW view_1_tab0_833

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_833

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_833') DROP VIEW view_2_tab0_833

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_833

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_833') DROP VIEW view_3_tab0_833

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_833

statement ok
CREATE VIEW view_1_tab0_833 AS SELECT pk, col0 FROM tab0 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555

statement ok
CREATE VIEW view_2_tab0_833 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)

statement ok
CREATE VIEW view_3_tab0_833 AS SELECT pk FROM view_1_tab0_833

query II rowsort label-3300-1
SELECT pk, col0 FROM tab0 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555
----

query II rowsort label-3300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab0_833
----

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab0_833
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_833 UNION ALL SELECT pk, col0 FROM view_2_tab0_833
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_833 UNION SELECT pk, col0 FROM view_2_tab0_833
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555 ) AS tab0_833
----

query I rowsort label-3300-3
SELECT * FROM view_3_tab0_833
----

query I rowsort label-3300-3
SELECT pk FROM tab0 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555
----

statement ok
DROP VIEW view_1_tab0_833

statement ok
DROP VIEW view_2_tab0_833

statement ok
DROP VIEW view_3_tab0_833

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_833') DROP VIEW view_1_tab1_833

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_833

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_833') DROP VIEW view_2_tab1_833

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_833

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_833') DROP VIEW view_3_tab1_833

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_833

statement ok
CREATE VIEW view_1_tab1_833 AS SELECT pk, col0 FROM tab1 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555

statement ok
CREATE VIEW view_2_tab1_833 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)

statement ok
CREATE VIEW view_3_tab1_833 AS SELECT pk FROM view_1_tab1_833

query II rowsort label-3300-1
SELECT pk, col0 FROM tab1 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555
----

query II rowsort label-3300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab1_833
----

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab1_833
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_833 UNION ALL SELECT pk, col0 FROM view_2_tab1_833
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_833 UNION SELECT pk, col0 FROM view_2_tab1_833
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555 ) AS tab1_833
----

query I rowsort label-3300-3
SELECT * FROM view_3_tab1_833
----

query I rowsort label-3300-3
SELECT pk FROM tab1 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555
----

statement ok
DROP VIEW view_1_tab1_833

statement ok
DROP VIEW view_2_tab1_833

statement ok
DROP VIEW view_3_tab1_833

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_833') DROP VIEW view_1_tab2_833

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_833

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_833') DROP VIEW view_2_tab2_833

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_833

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_833') DROP VIEW view_3_tab2_833

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_833

statement ok
CREATE VIEW view_1_tab2_833 AS SELECT pk, col0 FROM tab2 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555

statement ok
CREATE VIEW view_2_tab2_833 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)

statement ok
CREATE VIEW view_3_tab2_833 AS SELECT pk FROM view_1_tab2_833

query II rowsort label-3300-1
SELECT pk, col0 FROM tab2 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555
----

query II rowsort label-3300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab2_833
----

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab2_833
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_833 UNION ALL SELECT pk, col0 FROM view_2_tab2_833
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_833 UNION SELECT pk, col0 FROM view_2_tab2_833
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555 ) AS tab2_833
----

query I rowsort label-3300-3
SELECT * FROM view_3_tab2_833
----

query I rowsort label-3300-3
SELECT pk FROM tab2 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555
----

statement ok
DROP VIEW view_1_tab2_833

statement ok
DROP VIEW view_2_tab2_833

statement ok
DROP VIEW view_3_tab2_833

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_833') DROP VIEW view_1_tab3_833

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_833

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_833') DROP VIEW view_2_tab3_833

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_833

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_833') DROP VIEW view_3_tab3_833

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_833

statement ok
CREATE VIEW view_1_tab3_833 AS SELECT pk, col0 FROM tab3 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555

statement ok
CREATE VIEW view_2_tab3_833 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)

statement ok
CREATE VIEW view_3_tab3_833 AS SELECT pk FROM view_1_tab3_833

query II rowsort label-3300-1
SELECT pk, col0 FROM tab3 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555
----

query II rowsort label-3300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab3_833
----

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab3_833
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_833 UNION ALL SELECT pk, col0 FROM view_2_tab3_833
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_833 UNION SELECT pk, col0 FROM view_2_tab3_833
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555 ) AS tab3_833
----

query I rowsort label-3300-3
SELECT * FROM view_3_tab3_833
----

query I rowsort label-3300-3
SELECT pk FROM tab3 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555
----

statement ok
DROP VIEW view_1_tab3_833

statement ok
DROP VIEW view_2_tab3_833

statement ok
DROP VIEW view_3_tab3_833

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_833') DROP VIEW view_1_tab4_833

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_833

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_833') DROP VIEW view_2_tab4_833

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_833

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_833') DROP VIEW view_3_tab4_833

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_833

statement ok
CREATE VIEW view_1_tab4_833 AS SELECT pk, col0 FROM tab4 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555

statement ok
CREATE VIEW view_2_tab4_833 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)

statement ok
CREATE VIEW view_3_tab4_833 AS SELECT pk FROM view_1_tab4_833

query II rowsort label-3300-1
SELECT pk, col0 FROM tab4 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555
----

query II rowsort label-3300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab4_833
----

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab4_833
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_833 UNION ALL SELECT pk, col0 FROM view_2_tab4_833
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_833 UNION SELECT pk, col0 FROM view_2_tab4_833
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555 ) AS tab4_833
----

query I rowsort label-3300-3
SELECT * FROM view_3_tab4_833
----

query I rowsort label-3300-3
SELECT pk FROM tab4 WHERE col4 < 807.28 AND ((col3 < 156) AND (((col0 IS NULL)) AND ((col1 >= 386.75)) AND (((col4 > 820.90)) AND col3 < 18))) AND col3 < 555
----

statement ok
DROP VIEW view_1_tab4_833

statement ok
DROP VIEW view_2_tab4_833

statement ok
DROP VIEW view_3_tab4_833

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_834') DROP VIEW view_1_tab0_834

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_834

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_834') DROP VIEW view_2_tab0_834

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_834

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_834') DROP VIEW view_3_tab0_834

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_834

statement ok
CREATE VIEW view_1_tab0_834 AS SELECT pk, col0 FROM tab0 WHERE col0 < 900

statement ok
CREATE VIEW view_2_tab0_834 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 900)

statement ok
CREATE VIEW view_3_tab0_834 AS SELECT pk FROM view_1_tab0_834

query II rowsort label-3400-1
SELECT pk, col0 FROM tab0 WHERE col0 < 900
----
176 values hashing to 59c242ee9bddaca28597d38cd20e0438

query II rowsort label-3400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 900)
----
24 values hashing to 72c2f2d6dcd165e4db624bc1196ccbe9

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab0_834
----
176 values hashing to 59c242ee9bddaca28597d38cd20e0438

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab0_834
----
24 values hashing to 72c2f2d6dcd165e4db624bc1196ccbe9

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 900 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 900)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_834 UNION ALL SELECT pk, col0 FROM view_2_tab0_834
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 900 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 900)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_834 UNION SELECT pk, col0 FROM view_2_tab0_834
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 900 ) AS tab0_834
----
88 values hashing to ef3cc7938fb7135a6f01bb9392c5b371

query I rowsort label-3400-3
SELECT * FROM view_3_tab0_834
----
88 values hashing to ef3cc7938fb7135a6f01bb9392c5b371

query I rowsort label-3400-3
SELECT pk FROM tab0 WHERE col0 < 900
----
88 values hashing to ef3cc7938fb7135a6f01bb9392c5b371

statement ok
DROP VIEW view_1_tab0_834

statement ok
DROP VIEW view_2_tab0_834

statement ok
DROP VIEW view_3_tab0_834

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_834') DROP VIEW view_1_tab1_834

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_834

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_834') DROP VIEW view_2_tab1_834

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_834

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_834') DROP VIEW view_3_tab1_834

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_834

statement ok
CREATE VIEW view_1_tab1_834 AS SELECT pk, col0 FROM tab1 WHERE col0 < 900

statement ok
CREATE VIEW view_2_tab1_834 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 900)

statement ok
CREATE VIEW view_3_tab1_834 AS SELECT pk FROM view_1_tab1_834

query II rowsort label-3400-1
SELECT pk, col0 FROM tab1 WHERE col0 < 900
----
176 values hashing to 59c242ee9bddaca28597d38cd20e0438

query II rowsort label-3400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 900)
----
24 values hashing to 72c2f2d6dcd165e4db624bc1196ccbe9

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab1_834
----
176 values hashing to 59c242ee9bddaca28597d38cd20e0438

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab1_834
----
24 values hashing to 72c2f2d6dcd165e4db624bc1196ccbe9

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 900 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 900)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_834 UNION ALL SELECT pk, col0 FROM view_2_tab1_834
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 900 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 900)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_834 UNION SELECT pk, col0 FROM view_2_tab1_834
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 900 ) AS tab1_834
----
88 values hashing to ef3cc7938fb7135a6f01bb9392c5b371

query I rowsort label-3400-3
SELECT * FROM view_3_tab1_834
----
88 values hashing to ef3cc7938fb7135a6f01bb9392c5b371

query I rowsort label-3400-3
SELECT pk FROM tab1 WHERE col0 < 900
----
88 values hashing to ef3cc7938fb7135a6f01bb9392c5b371

statement ok
DROP VIEW view_1_tab1_834

statement ok
DROP VIEW view_2_tab1_834

statement ok
DROP VIEW view_3_tab1_834

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_834') DROP VIEW view_1_tab2_834

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_834

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_834') DROP VIEW view_2_tab2_834

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_834

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_834') DROP VIEW view_3_tab2_834

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_834

statement ok
CREATE VIEW view_1_tab2_834 AS SELECT pk, col0 FROM tab2 WHERE col0 < 900

statement ok
CREATE VIEW view_2_tab2_834 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 900)

statement ok
CREATE VIEW view_3_tab2_834 AS SELECT pk FROM view_1_tab2_834

query II rowsort label-3400-1
SELECT pk, col0 FROM tab2 WHERE col0 < 900
----
176 values hashing to 59c242ee9bddaca28597d38cd20e0438

query II rowsort label-3400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 900)
----
24 values hashing to 72c2f2d6dcd165e4db624bc1196ccbe9

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab2_834
----
176 values hashing to 59c242ee9bddaca28597d38cd20e0438

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab2_834
----
24 values hashing to 72c2f2d6dcd165e4db624bc1196ccbe9

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 900 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 900)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_834 UNION ALL SELECT pk, col0 FROM view_2_tab2_834
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 900 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 900)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_834 UNION SELECT pk, col0 FROM view_2_tab2_834
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 900 ) AS tab2_834
----
88 values hashing to ef3cc7938fb7135a6f01bb9392c5b371

query I rowsort label-3400-3
SELECT * FROM view_3_tab2_834
----
88 values hashing to ef3cc7938fb7135a6f01bb9392c5b371

query I rowsort label-3400-3
SELECT pk FROM tab2 WHERE col0 < 900
----
88 values hashing to ef3cc7938fb7135a6f01bb9392c5b371

statement ok
DROP VIEW view_1_tab2_834

statement ok
DROP VIEW view_2_tab2_834

statement ok
DROP VIEW view_3_tab2_834

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_834') DROP VIEW view_1_tab3_834

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_834

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_834') DROP VIEW view_2_tab3_834

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_834

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_834') DROP VIEW view_3_tab3_834

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_834

statement ok
CREATE VIEW view_1_tab3_834 AS SELECT pk, col0 FROM tab3 WHERE col0 < 900

statement ok
CREATE VIEW view_2_tab3_834 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 900)

statement ok
CREATE VIEW view_3_tab3_834 AS SELECT pk FROM view_1_tab3_834

query II rowsort label-3400-1
SELECT pk, col0 FROM tab3 WHERE col0 < 900
----
176 values hashing to 59c242ee9bddaca28597d38cd20e0438

query II rowsort label-3400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 900)
----
24 values hashing to 72c2f2d6dcd165e4db624bc1196ccbe9

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab3_834
----
176 values hashing to 59c242ee9bddaca28597d38cd20e0438

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab3_834
----
24 values hashing to 72c2f2d6dcd165e4db624bc1196ccbe9

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 900 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 900)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_834 UNION ALL SELECT pk, col0 FROM view_2_tab3_834
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 900 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 900)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_834 UNION SELECT pk, col0 FROM view_2_tab3_834
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 900 ) AS tab3_834
----
88 values hashing to ef3cc7938fb7135a6f01bb9392c5b371

query I rowsort label-3400-3
SELECT * FROM view_3_tab3_834
----
88 values hashing to ef3cc7938fb7135a6f01bb9392c5b371

query I rowsort label-3400-3
SELECT pk FROM tab3 WHERE col0 < 900
----
88 values hashing to ef3cc7938fb7135a6f01bb9392c5b371

statement ok
DROP VIEW view_1_tab3_834

statement ok
DROP VIEW view_2_tab3_834

statement ok
DROP VIEW view_3_tab3_834

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_834') DROP VIEW view_1_tab4_834

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_834

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_834') DROP VIEW view_2_tab4_834

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_834

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_834') DROP VIEW view_3_tab4_834

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_834

statement ok
CREATE VIEW view_1_tab4_834 AS SELECT pk, col0 FROM tab4 WHERE col0 < 900

statement ok
CREATE VIEW view_2_tab4_834 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 900)

statement ok
CREATE VIEW view_3_tab4_834 AS SELECT pk FROM view_1_tab4_834

query II rowsort label-3400-1
SELECT pk, col0 FROM tab4 WHERE col0 < 900
----
176 values hashing to 59c242ee9bddaca28597d38cd20e0438

query II rowsort label-3400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 900)
----
24 values hashing to 72c2f2d6dcd165e4db624bc1196ccbe9

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab4_834
----
176 values hashing to 59c242ee9bddaca28597d38cd20e0438

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab4_834
----
24 values hashing to 72c2f2d6dcd165e4db624bc1196ccbe9

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 900 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 900)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_834 UNION ALL SELECT pk, col0 FROM view_2_tab4_834
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 900 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 900)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_834 UNION SELECT pk, col0 FROM view_2_tab4_834
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 900 ) AS tab4_834
----
88 values hashing to ef3cc7938fb7135a6f01bb9392c5b371

query I rowsort label-3400-3
SELECT * FROM view_3_tab4_834
----
88 values hashing to ef3cc7938fb7135a6f01bb9392c5b371

query I rowsort label-3400-3
SELECT pk FROM tab4 WHERE col0 < 900
----
88 values hashing to ef3cc7938fb7135a6f01bb9392c5b371

statement ok
DROP VIEW view_1_tab4_834

statement ok
DROP VIEW view_2_tab4_834

statement ok
DROP VIEW view_3_tab4_834

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_835') DROP VIEW view_1_tab0_835

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_835

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_835') DROP VIEW view_2_tab0_835

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_835

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_835') DROP VIEW view_3_tab0_835

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_835

statement ok
CREATE VIEW view_1_tab0_835 AS SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75

statement ok
CREATE VIEW view_2_tab0_835 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)

statement ok
CREATE VIEW view_3_tab0_835 AS SELECT pk FROM view_1_tab0_835

query II rowsort label-3500-1
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75
----
196 values hashing to 57ceeffb966c3fcd869ad2a02552d4c3

query II rowsort label-3500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)
----
54
854
74
862

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab0_835
----
196 values hashing to 57ceeffb966c3fcd869ad2a02552d4c3

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab0_835
----
54
854
74
862

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_835 UNION ALL SELECT pk, col0 FROM view_2_tab0_835
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_835 UNION SELECT pk, col0 FROM view_2_tab0_835
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75 ) AS tab0_835
----
98 values hashing to 2f1073805e7af2512ba4608efb625e20

query I rowsort label-3500-3
SELECT * FROM view_3_tab0_835
----
98 values hashing to 2f1073805e7af2512ba4608efb625e20

query I rowsort label-3500-3
SELECT pk FROM tab0 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75
----
98 values hashing to 2f1073805e7af2512ba4608efb625e20

statement ok
DROP VIEW view_1_tab0_835

statement ok
DROP VIEW view_2_tab0_835

statement ok
DROP VIEW view_3_tab0_835

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_835') DROP VIEW view_1_tab1_835

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_835

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_835') DROP VIEW view_2_tab1_835

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_835

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_835') DROP VIEW view_3_tab1_835

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_835

statement ok
CREATE VIEW view_1_tab1_835 AS SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75

statement ok
CREATE VIEW view_2_tab1_835 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)

statement ok
CREATE VIEW view_3_tab1_835 AS SELECT pk FROM view_1_tab1_835

query II rowsort label-3500-1
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75
----
196 values hashing to 57ceeffb966c3fcd869ad2a02552d4c3

query II rowsort label-3500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)
----
54
854
74
862

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab1_835
----
196 values hashing to 57ceeffb966c3fcd869ad2a02552d4c3

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab1_835
----
54
854
74
862

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_835 UNION ALL SELECT pk, col0 FROM view_2_tab1_835
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_835 UNION SELECT pk, col0 FROM view_2_tab1_835
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75 ) AS tab1_835
----
98 values hashing to 2f1073805e7af2512ba4608efb625e20

query I rowsort label-3500-3
SELECT * FROM view_3_tab1_835
----
98 values hashing to 2f1073805e7af2512ba4608efb625e20

query I rowsort label-3500-3
SELECT pk FROM tab1 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75
----
98 values hashing to 2f1073805e7af2512ba4608efb625e20

statement ok
DROP VIEW view_1_tab1_835

statement ok
DROP VIEW view_2_tab1_835

statement ok
DROP VIEW view_3_tab1_835

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_835') DROP VIEW view_1_tab2_835

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_835

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_835') DROP VIEW view_2_tab2_835

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_835

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_835') DROP VIEW view_3_tab2_835

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_835

statement ok
CREATE VIEW view_1_tab2_835 AS SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75

statement ok
CREATE VIEW view_2_tab2_835 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)

statement ok
CREATE VIEW view_3_tab2_835 AS SELECT pk FROM view_1_tab2_835

query II rowsort label-3500-1
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75
----
196 values hashing to 57ceeffb966c3fcd869ad2a02552d4c3

query II rowsort label-3500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)
----
54
854
74
862

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab2_835
----
196 values hashing to 57ceeffb966c3fcd869ad2a02552d4c3

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab2_835
----
54
854
74
862

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_835 UNION ALL SELECT pk, col0 FROM view_2_tab2_835
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_835 UNION SELECT pk, col0 FROM view_2_tab2_835
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75 ) AS tab2_835
----
98 values hashing to 2f1073805e7af2512ba4608efb625e20

query I rowsort label-3500-3
SELECT * FROM view_3_tab2_835
----
98 values hashing to 2f1073805e7af2512ba4608efb625e20

query I rowsort label-3500-3
SELECT pk FROM tab2 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75
----
98 values hashing to 2f1073805e7af2512ba4608efb625e20

statement ok
DROP VIEW view_1_tab2_835

statement ok
DROP VIEW view_2_tab2_835

statement ok
DROP VIEW view_3_tab2_835

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_835') DROP VIEW view_1_tab3_835

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_835

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_835') DROP VIEW view_2_tab3_835

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_835

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_835') DROP VIEW view_3_tab3_835

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_835

statement ok
CREATE VIEW view_1_tab3_835 AS SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75

statement ok
CREATE VIEW view_2_tab3_835 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)

statement ok
CREATE VIEW view_3_tab3_835 AS SELECT pk FROM view_1_tab3_835

query II rowsort label-3500-1
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75
----
196 values hashing to 57ceeffb966c3fcd869ad2a02552d4c3

query II rowsort label-3500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)
----
54
854
74
862

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab3_835
----
196 values hashing to 57ceeffb966c3fcd869ad2a02552d4c3

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab3_835
----
54
854
74
862

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_835 UNION ALL SELECT pk, col0 FROM view_2_tab3_835
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_835 UNION SELECT pk, col0 FROM view_2_tab3_835
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75 ) AS tab3_835
----
98 values hashing to 2f1073805e7af2512ba4608efb625e20

query I rowsort label-3500-3
SELECT * FROM view_3_tab3_835
----
98 values hashing to 2f1073805e7af2512ba4608efb625e20

query I rowsort label-3500-3
SELECT pk FROM tab3 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75
----
98 values hashing to 2f1073805e7af2512ba4608efb625e20

statement ok
DROP VIEW view_1_tab3_835

statement ok
DROP VIEW view_2_tab3_835

statement ok
DROP VIEW view_3_tab3_835

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_835') DROP VIEW view_1_tab4_835

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_835

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_835') DROP VIEW view_2_tab4_835

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_835

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_835') DROP VIEW view_3_tab4_835

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_835

statement ok
CREATE VIEW view_1_tab4_835 AS SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75

statement ok
CREATE VIEW view_2_tab4_835 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)

statement ok
CREATE VIEW view_3_tab4_835 AS SELECT pk FROM view_1_tab4_835

query II rowsort label-3500-1
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75
----
196 values hashing to 57ceeffb966c3fcd869ad2a02552d4c3

query II rowsort label-3500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)
----
54
854
74
862

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab4_835
----
196 values hashing to 57ceeffb966c3fcd869ad2a02552d4c3

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab4_835
----
54
854
74
862

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_835 UNION ALL SELECT pk, col0 FROM view_2_tab4_835
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_835 UNION SELECT pk, col0 FROM view_2_tab4_835
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75 ) AS tab4_835
----
98 values hashing to 2f1073805e7af2512ba4608efb625e20

query I rowsort label-3500-3
SELECT * FROM view_3_tab4_835
----
98 values hashing to 2f1073805e7af2512ba4608efb625e20

query I rowsort label-3500-3
SELECT pk FROM tab4 WHERE col0 IS NULL OR (((((col3 > 622) OR col0 IN (192,92))) OR col1 <= 698.17 OR (col1 > 983.99))) OR col0 > 11 AND ((col3 > 990 OR (col3 < 225)) OR col1 <= 925.16) AND col0 > 11 OR col0 <= 838 AND col4 > 721.75
----
98 values hashing to 2f1073805e7af2512ba4608efb625e20

statement ok
DROP VIEW view_1_tab4_835

statement ok
DROP VIEW view_2_tab4_835

statement ok
DROP VIEW view_3_tab4_835

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_836') DROP VIEW view_1_tab0_836

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_836

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_836') DROP VIEW view_2_tab0_836

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_836

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_836') DROP VIEW view_3_tab0_836

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_836

statement ok
CREATE VIEW view_1_tab0_836 AS SELECT pk, col0 FROM tab0 WHERE col3 < 819

statement ok
CREATE VIEW view_2_tab0_836 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 819)

statement ok
CREATE VIEW view_3_tab0_836 AS SELECT pk FROM view_1_tab0_836

query II rowsort label-3600-1
SELECT pk, col0 FROM tab0 WHERE col3 < 819
----
160 values hashing to 6f310f139bce8553bcd75967f488b9e5

query II rowsort label-3600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 819)
----
40 values hashing to eab2d94466e21d600b95fe5fb9b02915

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab0_836
----
160 values hashing to 6f310f139bce8553bcd75967f488b9e5

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab0_836
----
40 values hashing to eab2d94466e21d600b95fe5fb9b02915

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 819 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 819)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_836 UNION ALL SELECT pk, col0 FROM view_2_tab0_836
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 819 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 819)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_836 UNION SELECT pk, col0 FROM view_2_tab0_836
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 < 819 ) AS tab0_836
----
80 values hashing to ac14f200848aff55b305b5f63961891d

query I rowsort label-3600-3
SELECT * FROM view_3_tab0_836
----
80 values hashing to ac14f200848aff55b305b5f63961891d

query I rowsort label-3600-3
SELECT pk FROM tab0 WHERE col3 < 819
----
80 values hashing to ac14f200848aff55b305b5f63961891d

statement ok
DROP VIEW view_1_tab0_836

statement ok
DROP VIEW view_2_tab0_836

statement ok
DROP VIEW view_3_tab0_836

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_836') DROP VIEW view_1_tab1_836

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_836

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_836') DROP VIEW view_2_tab1_836

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_836

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_836') DROP VIEW view_3_tab1_836

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_836

statement ok
CREATE VIEW view_1_tab1_836 AS SELECT pk, col0 FROM tab1 WHERE col3 < 819

statement ok
CREATE VIEW view_2_tab1_836 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 819)

statement ok
CREATE VIEW view_3_tab1_836 AS SELECT pk FROM view_1_tab1_836

query II rowsort label-3600-1
SELECT pk, col0 FROM tab1 WHERE col3 < 819
----
160 values hashing to 6f310f139bce8553bcd75967f488b9e5

query II rowsort label-3600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 819)
----
40 values hashing to eab2d94466e21d600b95fe5fb9b02915

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab1_836
----
160 values hashing to 6f310f139bce8553bcd75967f488b9e5

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab1_836
----
40 values hashing to eab2d94466e21d600b95fe5fb9b02915

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 819 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 819)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_836 UNION ALL SELECT pk, col0 FROM view_2_tab1_836
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 819 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 819)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_836 UNION SELECT pk, col0 FROM view_2_tab1_836
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 < 819 ) AS tab1_836
----
80 values hashing to ac14f200848aff55b305b5f63961891d

query I rowsort label-3600-3
SELECT * FROM view_3_tab1_836
----
80 values hashing to ac14f200848aff55b305b5f63961891d

query I rowsort label-3600-3
SELECT pk FROM tab1 WHERE col3 < 819
----
80 values hashing to ac14f200848aff55b305b5f63961891d

statement ok
DROP VIEW view_1_tab1_836

statement ok
DROP VIEW view_2_tab1_836

statement ok
DROP VIEW view_3_tab1_836

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_836') DROP VIEW view_1_tab2_836

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_836

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_836') DROP VIEW view_2_tab2_836

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_836

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_836') DROP VIEW view_3_tab2_836

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_836

statement ok
CREATE VIEW view_1_tab2_836 AS SELECT pk, col0 FROM tab2 WHERE col3 < 819

statement ok
CREATE VIEW view_2_tab2_836 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 819)

statement ok
CREATE VIEW view_3_tab2_836 AS SELECT pk FROM view_1_tab2_836

query II rowsort label-3600-1
SELECT pk, col0 FROM tab2 WHERE col3 < 819
----
160 values hashing to 6f310f139bce8553bcd75967f488b9e5

query II rowsort label-3600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 819)
----
40 values hashing to eab2d94466e21d600b95fe5fb9b02915

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab2_836
----
160 values hashing to 6f310f139bce8553bcd75967f488b9e5

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab2_836
----
40 values hashing to eab2d94466e21d600b95fe5fb9b02915

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 819 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 819)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_836 UNION ALL SELECT pk, col0 FROM view_2_tab2_836
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 819 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 819)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_836 UNION SELECT pk, col0 FROM view_2_tab2_836
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 < 819 ) AS tab2_836
----
80 values hashing to ac14f200848aff55b305b5f63961891d

query I rowsort label-3600-3
SELECT * FROM view_3_tab2_836
----
80 values hashing to ac14f200848aff55b305b5f63961891d

query I rowsort label-3600-3
SELECT pk FROM tab2 WHERE col3 < 819
----
80 values hashing to ac14f200848aff55b305b5f63961891d

statement ok
DROP VIEW view_1_tab2_836

statement ok
DROP VIEW view_2_tab2_836

statement ok
DROP VIEW view_3_tab2_836

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_836') DROP VIEW view_1_tab3_836

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_836

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_836') DROP VIEW view_2_tab3_836

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_836

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_836') DROP VIEW view_3_tab3_836

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_836

statement ok
CREATE VIEW view_1_tab3_836 AS SELECT pk, col0 FROM tab3 WHERE col3 < 819

statement ok
CREATE VIEW view_2_tab3_836 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 819)

statement ok
CREATE VIEW view_3_tab3_836 AS SELECT pk FROM view_1_tab3_836

query II rowsort label-3600-1
SELECT pk, col0 FROM tab3 WHERE col3 < 819
----
160 values hashing to 6f310f139bce8553bcd75967f488b9e5

query II rowsort label-3600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 819)
----
40 values hashing to eab2d94466e21d600b95fe5fb9b02915

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab3_836
----
160 values hashing to 6f310f139bce8553bcd75967f488b9e5

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab3_836
----
40 values hashing to eab2d94466e21d600b95fe5fb9b02915

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 819 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 819)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_836 UNION ALL SELECT pk, col0 FROM view_2_tab3_836
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 819 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 819)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_836 UNION SELECT pk, col0 FROM view_2_tab3_836
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 < 819 ) AS tab3_836
----
80 values hashing to ac14f200848aff55b305b5f63961891d

query I rowsort label-3600-3
SELECT * FROM view_3_tab3_836
----
80 values hashing to ac14f200848aff55b305b5f63961891d

query I rowsort label-3600-3
SELECT pk FROM tab3 WHERE col3 < 819
----
80 values hashing to ac14f200848aff55b305b5f63961891d

statement ok
DROP VIEW view_1_tab3_836

statement ok
DROP VIEW view_2_tab3_836

statement ok
DROP VIEW view_3_tab3_836

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_836') DROP VIEW view_1_tab4_836

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_836

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_836') DROP VIEW view_2_tab4_836

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_836

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_836') DROP VIEW view_3_tab4_836

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_836

statement ok
CREATE VIEW view_1_tab4_836 AS SELECT pk, col0 FROM tab4 WHERE col3 < 819

statement ok
CREATE VIEW view_2_tab4_836 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 819)

statement ok
CREATE VIEW view_3_tab4_836 AS SELECT pk FROM view_1_tab4_836

query II rowsort label-3600-1
SELECT pk, col0 FROM tab4 WHERE col3 < 819
----
160 values hashing to 6f310f139bce8553bcd75967f488b9e5

query II rowsort label-3600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 819)
----
40 values hashing to eab2d94466e21d600b95fe5fb9b02915

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab4_836
----
160 values hashing to 6f310f139bce8553bcd75967f488b9e5

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab4_836
----
40 values hashing to eab2d94466e21d600b95fe5fb9b02915

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 819 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 819)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_836 UNION ALL SELECT pk, col0 FROM view_2_tab4_836
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 819 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 819)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_836 UNION SELECT pk, col0 FROM view_2_tab4_836
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 < 819 ) AS tab4_836
----
80 values hashing to ac14f200848aff55b305b5f63961891d

query I rowsort label-3600-3
SELECT * FROM view_3_tab4_836
----
80 values hashing to ac14f200848aff55b305b5f63961891d

query I rowsort label-3600-3
SELECT pk FROM tab4 WHERE col3 < 819
----
80 values hashing to ac14f200848aff55b305b5f63961891d

statement ok
DROP VIEW view_1_tab4_836

statement ok
DROP VIEW view_2_tab4_836

statement ok
DROP VIEW view_3_tab4_836

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_837') DROP VIEW view_1_tab0_837

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_837

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_837') DROP VIEW view_2_tab0_837

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_837

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_837') DROP VIEW view_3_tab0_837

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_837

statement ok
CREATE VIEW view_1_tab0_837 AS SELECT pk, col0 FROM tab0 WHERE col1 > 949.60

statement ok
CREATE VIEW view_2_tab0_837 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 949.60)

statement ok
CREATE VIEW view_3_tab0_837 AS SELECT pk FROM view_1_tab0_837

query II rowsort label-3700-1
SELECT pk, col0 FROM tab0 WHERE col1 > 949.60
----
10 values hashing to 9282de634219788c720f66806eb62fc0

query II rowsort label-3700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 949.60)
----
190 values hashing to 8113b72ed890ad637a00600fcfe56237

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab0_837
----
10 values hashing to 9282de634219788c720f66806eb62fc0

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab0_837
----
190 values hashing to 8113b72ed890ad637a00600fcfe56237

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 949.60 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 949.60)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_837 UNION ALL SELECT pk, col0 FROM view_2_tab0_837
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 949.60 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 949.60)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_837 UNION SELECT pk, col0 FROM view_2_tab0_837
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 949.60 ) AS tab0_837
----
54
65
74
76
96

query I rowsort label-3700-3
SELECT * FROM view_3_tab0_837
----
54
65
74
76
96

query I rowsort label-3700-3
SELECT pk FROM tab0 WHERE col1 > 949.60
----
54
65
74
76
96

statement ok
DROP VIEW view_1_tab0_837

statement ok
DROP VIEW view_2_tab0_837

statement ok
DROP VIEW view_3_tab0_837

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_837') DROP VIEW view_1_tab1_837

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_837

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_837') DROP VIEW view_2_tab1_837

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_837

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_837') DROP VIEW view_3_tab1_837

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_837

statement ok
CREATE VIEW view_1_tab1_837 AS SELECT pk, col0 FROM tab1 WHERE col1 > 949.60

statement ok
CREATE VIEW view_2_tab1_837 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 949.60)

statement ok
CREATE VIEW view_3_tab1_837 AS SELECT pk FROM view_1_tab1_837

query II rowsort label-3700-1
SELECT pk, col0 FROM tab1 WHERE col1 > 949.60
----
10 values hashing to 9282de634219788c720f66806eb62fc0

query II rowsort label-3700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 949.60)
----
190 values hashing to 8113b72ed890ad637a00600fcfe56237

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab1_837
----
10 values hashing to 9282de634219788c720f66806eb62fc0

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab1_837
----
190 values hashing to 8113b72ed890ad637a00600fcfe56237

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 949.60 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 949.60)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_837 UNION ALL SELECT pk, col0 FROM view_2_tab1_837
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 949.60 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 949.60)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_837 UNION SELECT pk, col0 FROM view_2_tab1_837
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 949.60 ) AS tab1_837
----
54
65
74
76
96

query I rowsort label-3700-3
SELECT * FROM view_3_tab1_837
----
54
65
74
76
96

query I rowsort label-3700-3
SELECT pk FROM tab1 WHERE col1 > 949.60
----
54
65
74
76
96

statement ok
DROP VIEW view_1_tab1_837

statement ok
DROP VIEW view_2_tab1_837

statement ok
DROP VIEW view_3_tab1_837

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_837') DROP VIEW view_1_tab2_837

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_837

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_837') DROP VIEW view_2_tab2_837

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_837

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_837') DROP VIEW view_3_tab2_837

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_837

statement ok
CREATE VIEW view_1_tab2_837 AS SELECT pk, col0 FROM tab2 WHERE col1 > 949.60

statement ok
CREATE VIEW view_2_tab2_837 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 949.60)

statement ok
CREATE VIEW view_3_tab2_837 AS SELECT pk FROM view_1_tab2_837

query II rowsort label-3700-1
SELECT pk, col0 FROM tab2 WHERE col1 > 949.60
----
10 values hashing to 9282de634219788c720f66806eb62fc0

query II rowsort label-3700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 949.60)
----
190 values hashing to 8113b72ed890ad637a00600fcfe56237

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab2_837
----
10 values hashing to 9282de634219788c720f66806eb62fc0

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab2_837
----
190 values hashing to 8113b72ed890ad637a00600fcfe56237

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 949.60 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 949.60)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_837 UNION ALL SELECT pk, col0 FROM view_2_tab2_837
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 949.60 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 949.60)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_837 UNION SELECT pk, col0 FROM view_2_tab2_837
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 949.60 ) AS tab2_837
----
54
65
74
76
96

query I rowsort label-3700-3
SELECT * FROM view_3_tab2_837
----
54
65
74
76
96

query I rowsort label-3700-3
SELECT pk FROM tab2 WHERE col1 > 949.60
----
54
65
74
76
96

statement ok
DROP VIEW view_1_tab2_837

statement ok
DROP VIEW view_2_tab2_837

statement ok
DROP VIEW view_3_tab2_837

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_837') DROP VIEW view_1_tab3_837

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_837

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_837') DROP VIEW view_2_tab3_837

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_837

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_837') DROP VIEW view_3_tab3_837

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_837

statement ok
CREATE VIEW view_1_tab3_837 AS SELECT pk, col0 FROM tab3 WHERE col1 > 949.60

statement ok
CREATE VIEW view_2_tab3_837 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 949.60)

statement ok
CREATE VIEW view_3_tab3_837 AS SELECT pk FROM view_1_tab3_837

query II rowsort label-3700-1
SELECT pk, col0 FROM tab3 WHERE col1 > 949.60
----
10 values hashing to 9282de634219788c720f66806eb62fc0

query II rowsort label-3700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 949.60)
----
190 values hashing to 8113b72ed890ad637a00600fcfe56237

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab3_837
----
10 values hashing to 9282de634219788c720f66806eb62fc0

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab3_837
----
190 values hashing to 8113b72ed890ad637a00600fcfe56237

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 949.60 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 949.60)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_837 UNION ALL SELECT pk, col0 FROM view_2_tab3_837
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 949.60 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 949.60)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_837 UNION SELECT pk, col0 FROM view_2_tab3_837
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 949.60 ) AS tab3_837
----
54
65
74
76
96

query I rowsort label-3700-3
SELECT * FROM view_3_tab3_837
----
54
65
74
76
96

query I rowsort label-3700-3
SELECT pk FROM tab3 WHERE col1 > 949.60
----
54
65
74
76
96

statement ok
DROP VIEW view_1_tab3_837

statement ok
DROP VIEW view_2_tab3_837

statement ok
DROP VIEW view_3_tab3_837

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_837') DROP VIEW view_1_tab4_837

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_837

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_837') DROP VIEW view_2_tab4_837

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_837

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_837') DROP VIEW view_3_tab4_837

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_837

statement ok
CREATE VIEW view_1_tab4_837 AS SELECT pk, col0 FROM tab4 WHERE col1 > 949.60

statement ok
CREATE VIEW view_2_tab4_837 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 949.60)

statement ok
CREATE VIEW view_3_tab4_837 AS SELECT pk FROM view_1_tab4_837

query II rowsort label-3700-1
SELECT pk, col0 FROM tab4 WHERE col1 > 949.60
----
10 values hashing to 9282de634219788c720f66806eb62fc0

query II rowsort label-3700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 949.60)
----
190 values hashing to 8113b72ed890ad637a00600fcfe56237

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab4_837
----
10 values hashing to 9282de634219788c720f66806eb62fc0

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab4_837
----
190 values hashing to 8113b72ed890ad637a00600fcfe56237

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 949.60 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 949.60)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_837 UNION ALL SELECT pk, col0 FROM view_2_tab4_837
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 949.60 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 949.60)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_837 UNION SELECT pk, col0 FROM view_2_tab4_837
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 949.60 ) AS tab4_837
----
54
65
74
76
96

query I rowsort label-3700-3
SELECT * FROM view_3_tab4_837
----
54
65
74
76
96

query I rowsort label-3700-3
SELECT pk FROM tab4 WHERE col1 > 949.60
----
54
65
74
76
96

statement ok
DROP VIEW view_1_tab4_837

statement ok
DROP VIEW view_2_tab4_837

statement ok
DROP VIEW view_3_tab4_837

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_838') DROP VIEW view_1_tab0_838

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_838

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_838') DROP VIEW view_2_tab0_838

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_838

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_838') DROP VIEW view_3_tab0_838

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_838

statement ok
CREATE VIEW view_1_tab0_838 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999)

statement ok
CREATE VIEW view_2_tab0_838 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))

statement ok
CREATE VIEW view_3_tab0_838 AS SELECT pk FROM view_1_tab0_838

query II rowsort label-3800-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3800-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))
----

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab0_838
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab0_838
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_838 UNION ALL SELECT pk, col0 FROM view_2_tab0_838
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_838 UNION SELECT pk, col0 FROM view_2_tab0_838
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999) ) AS tab0_838
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-3800-3
SELECT * FROM view_3_tab0_838
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-3800-3
SELECT pk FROM tab0 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999)
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

statement ok
DROP VIEW view_1_tab0_838

statement ok
DROP VIEW view_2_tab0_838

statement ok
DROP VIEW view_3_tab0_838

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_838') DROP VIEW view_1_tab1_838

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_838

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_838') DROP VIEW view_2_tab1_838

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_838

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_838') DROP VIEW view_3_tab1_838

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_838

statement ok
CREATE VIEW view_1_tab1_838 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999)

statement ok
CREATE VIEW view_2_tab1_838 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))

statement ok
CREATE VIEW view_3_tab1_838 AS SELECT pk FROM view_1_tab1_838

query II rowsort label-3800-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3800-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))
----

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab1_838
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab1_838
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_838 UNION ALL SELECT pk, col0 FROM view_2_tab1_838
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_838 UNION SELECT pk, col0 FROM view_2_tab1_838
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999) ) AS tab1_838
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-3800-3
SELECT * FROM view_3_tab1_838
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-3800-3
SELECT pk FROM tab1 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999)
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

statement ok
DROP VIEW view_1_tab1_838

statement ok
DROP VIEW view_2_tab1_838

statement ok
DROP VIEW view_3_tab1_838

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_838') DROP VIEW view_1_tab2_838

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_838

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_838') DROP VIEW view_2_tab2_838

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_838

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_838') DROP VIEW view_3_tab2_838

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_838

statement ok
CREATE VIEW view_1_tab2_838 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999)

statement ok
CREATE VIEW view_2_tab2_838 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))

statement ok
CREATE VIEW view_3_tab2_838 AS SELECT pk FROM view_1_tab2_838

query II rowsort label-3800-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3800-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))
----

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab2_838
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab2_838
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_838 UNION ALL SELECT pk, col0 FROM view_2_tab2_838
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_838 UNION SELECT pk, col0 FROM view_2_tab2_838
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999) ) AS tab2_838
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-3800-3
SELECT * FROM view_3_tab2_838
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-3800-3
SELECT pk FROM tab2 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999)
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

statement ok
DROP VIEW view_1_tab2_838

statement ok
DROP VIEW view_2_tab2_838

statement ok
DROP VIEW view_3_tab2_838

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_838') DROP VIEW view_1_tab3_838

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_838

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_838') DROP VIEW view_2_tab3_838

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_838

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_838') DROP VIEW view_3_tab3_838

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_838

statement ok
CREATE VIEW view_1_tab3_838 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999)

statement ok
CREATE VIEW view_2_tab3_838 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))

statement ok
CREATE VIEW view_3_tab3_838 AS SELECT pk FROM view_1_tab3_838

query II rowsort label-3800-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3800-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))
----

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab3_838
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab3_838
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_838 UNION ALL SELECT pk, col0 FROM view_2_tab3_838
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_838 UNION SELECT pk, col0 FROM view_2_tab3_838
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999) ) AS tab3_838
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-3800-3
SELECT * FROM view_3_tab3_838
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-3800-3
SELECT pk FROM tab3 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999)
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

statement ok
DROP VIEW view_1_tab3_838

statement ok
DROP VIEW view_2_tab3_838

statement ok
DROP VIEW view_3_tab3_838

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_838') DROP VIEW view_1_tab4_838

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_838

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_838') DROP VIEW view_2_tab4_838

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_838

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_838') DROP VIEW view_3_tab4_838

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_838

statement ok
CREATE VIEW view_1_tab4_838 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999)

statement ok
CREATE VIEW view_2_tab4_838 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))

statement ok
CREATE VIEW view_3_tab4_838 AS SELECT pk FROM view_1_tab4_838

query II rowsort label-3800-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3800-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))
----

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab4_838
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab4_838
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_838 UNION ALL SELECT pk, col0 FROM view_2_tab4_838
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_838 UNION SELECT pk, col0 FROM view_2_tab4_838
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999) ) AS tab4_838
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-3800-3
SELECT * FROM view_3_tab4_838
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-3800-3
SELECT pk FROM tab4 WHERE (col0 < 914 OR col1 > 906.49 OR col0 BETWEEN 389 AND 999)
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

statement ok
DROP VIEW view_1_tab4_838

statement ok
DROP VIEW view_2_tab4_838

statement ok
DROP VIEW view_3_tab4_838

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_839') DROP VIEW view_1_tab0_839

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_839

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_839') DROP VIEW view_2_tab0_839

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_839

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_839') DROP VIEW view_3_tab0_839

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_839

statement ok
CREATE VIEW view_1_tab0_839 AS SELECT pk, col0 FROM tab0 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96)

statement ok
CREATE VIEW view_2_tab0_839 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))

statement ok
CREATE VIEW view_3_tab0_839 AS SELECT pk FROM view_1_tab0_839

query II rowsort label-3900-1
SELECT pk, col0 FROM tab0 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96)
----

query II rowsort label-3900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab0_839
----

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab0_839
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_839 UNION ALL SELECT pk, col0 FROM view_2_tab0_839
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_839 UNION SELECT pk, col0 FROM view_2_tab0_839
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96) ) AS tab0_839
----

query I rowsort label-3900-3
SELECT * FROM view_3_tab0_839
----

query I rowsort label-3900-3
SELECT pk FROM tab0 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96)
----

statement ok
DROP VIEW view_1_tab0_839

statement ok
DROP VIEW view_2_tab0_839

statement ok
DROP VIEW view_3_tab0_839

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_839') DROP VIEW view_1_tab1_839

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_839

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_839') DROP VIEW view_2_tab1_839

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_839

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_839') DROP VIEW view_3_tab1_839

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_839

statement ok
CREATE VIEW view_1_tab1_839 AS SELECT pk, col0 FROM tab1 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96)

statement ok
CREATE VIEW view_2_tab1_839 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))

statement ok
CREATE VIEW view_3_tab1_839 AS SELECT pk FROM view_1_tab1_839

query II rowsort label-3900-1
SELECT pk, col0 FROM tab1 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96)
----

query II rowsort label-3900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab1_839
----

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab1_839
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_839 UNION ALL SELECT pk, col0 FROM view_2_tab1_839
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_839 UNION SELECT pk, col0 FROM view_2_tab1_839
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96) ) AS tab1_839
----

query I rowsort label-3900-3
SELECT * FROM view_3_tab1_839
----

query I rowsort label-3900-3
SELECT pk FROM tab1 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96)
----

statement ok
DROP VIEW view_1_tab1_839

statement ok
DROP VIEW view_2_tab1_839

statement ok
DROP VIEW view_3_tab1_839

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_839') DROP VIEW view_1_tab2_839

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_839

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_839') DROP VIEW view_2_tab2_839

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_839

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_839') DROP VIEW view_3_tab2_839

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_839

statement ok
CREATE VIEW view_1_tab2_839 AS SELECT pk, col0 FROM tab2 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96)

statement ok
CREATE VIEW view_2_tab2_839 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))

statement ok
CREATE VIEW view_3_tab2_839 AS SELECT pk FROM view_1_tab2_839

query II rowsort label-3900-1
SELECT pk, col0 FROM tab2 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96)
----

query II rowsort label-3900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab2_839
----

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab2_839
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_839 UNION ALL SELECT pk, col0 FROM view_2_tab2_839
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_839 UNION SELECT pk, col0 FROM view_2_tab2_839
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96) ) AS tab2_839
----

query I rowsort label-3900-3
SELECT * FROM view_3_tab2_839
----

query I rowsort label-3900-3
SELECT pk FROM tab2 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96)
----

statement ok
DROP VIEW view_1_tab2_839

statement ok
DROP VIEW view_2_tab2_839

statement ok
DROP VIEW view_3_tab2_839

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_839') DROP VIEW view_1_tab3_839

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_839

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_839') DROP VIEW view_2_tab3_839

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_839

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_839') DROP VIEW view_3_tab3_839

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_839

statement ok
CREATE VIEW view_1_tab3_839 AS SELECT pk, col0 FROM tab3 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96)

statement ok
CREATE VIEW view_2_tab3_839 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))

statement ok
CREATE VIEW view_3_tab3_839 AS SELECT pk FROM view_1_tab3_839

query II rowsort label-3900-1
SELECT pk, col0 FROM tab3 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96)
----

query II rowsort label-3900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab3_839
----

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab3_839
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_839 UNION ALL SELECT pk, col0 FROM view_2_tab3_839
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_839 UNION SELECT pk, col0 FROM view_2_tab3_839
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96) ) AS tab3_839
----

query I rowsort label-3900-3
SELECT * FROM view_3_tab3_839
----

query I rowsort label-3900-3
SELECT pk FROM tab3 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96)
----

statement ok
DROP VIEW view_1_tab3_839

statement ok
DROP VIEW view_2_tab3_839

statement ok
DROP VIEW view_3_tab3_839

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_839') DROP VIEW view_1_tab4_839

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_839

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_839') DROP VIEW view_2_tab4_839

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_839

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_839') DROP VIEW view_3_tab4_839

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_839

statement ok
CREATE VIEW view_1_tab4_839 AS SELECT pk, col0 FROM tab4 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96)

statement ok
CREATE VIEW view_2_tab4_839 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))

statement ok
CREATE VIEW view_3_tab4_839 AS SELECT pk FROM view_1_tab4_839

query II rowsort label-3900-1
SELECT pk, col0 FROM tab4 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96)
----

query II rowsort label-3900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab4_839
----

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab4_839
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_839 UNION ALL SELECT pk, col0 FROM view_2_tab4_839
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_839 UNION SELECT pk, col0 FROM view_2_tab4_839
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96) ) AS tab4_839
----

query I rowsort label-3900-3
SELECT * FROM view_3_tab4_839
----

query I rowsort label-3900-3
SELECT pk FROM tab4 WHERE col1 = 987.33 OR ((col0 < 781 AND (col0 < 934 AND col3 IN (211,625,799)))) AND (col0 <= 459 AND col1 < 710.96)
----

statement ok
DROP VIEW view_1_tab4_839

statement ok
DROP VIEW view_2_tab4_839

statement ok
DROP VIEW view_3_tab4_839

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_840') DROP VIEW view_1_tab0_840

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_840

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_840') DROP VIEW view_2_tab0_840

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_840

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_840') DROP VIEW view_3_tab0_840

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_840

statement ok
CREATE VIEW view_1_tab0_840 AS SELECT pk, col0 FROM tab0 WHERE col3 > 761

statement ok
CREATE VIEW view_2_tab0_840 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 761)

statement ok
CREATE VIEW view_3_tab0_840 AS SELECT pk FROM view_1_tab0_840

query II rowsort label-4000-1
SELECT pk, col0 FROM tab0 WHERE col3 > 761
----
54 values hashing to 70de56a737ecfe38506665c488e1ba16

query II rowsort label-4000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 761)
----
146 values hashing to 34395415918816e519fde731da483ac3

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab0_840
----
54 values hashing to 70de56a737ecfe38506665c488e1ba16

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab0_840
----
146 values hashing to 34395415918816e519fde731da483ac3

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 761 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 761)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_840 UNION ALL SELECT pk, col0 FROM view_2_tab0_840
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 761 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 761)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_840 UNION SELECT pk, col0 FROM view_2_tab0_840
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 761 ) AS tab0_840
----
27 values hashing to e3c03bb86ea056784b60ef65ed0fc065

query I rowsort label-4000-3
SELECT * FROM view_3_tab0_840
----
27 values hashing to e3c03bb86ea056784b60ef65ed0fc065

query I rowsort label-4000-3
SELECT pk FROM tab0 WHERE col3 > 761
----
27 values hashing to e3c03bb86ea056784b60ef65ed0fc065

statement ok
DROP VIEW view_1_tab0_840

statement ok
DROP VIEW view_2_tab0_840

statement ok
DROP VIEW view_3_tab0_840

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_840') DROP VIEW view_1_tab1_840

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_840

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_840') DROP VIEW view_2_tab1_840

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_840

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_840') DROP VIEW view_3_tab1_840

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_840

statement ok
CREATE VIEW view_1_tab1_840 AS SELECT pk, col0 FROM tab1 WHERE col3 > 761

statement ok
CREATE VIEW view_2_tab1_840 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 761)

statement ok
CREATE VIEW view_3_tab1_840 AS SELECT pk FROM view_1_tab1_840

query II rowsort label-4000-1
SELECT pk, col0 FROM tab1 WHERE col3 > 761
----
54 values hashing to 70de56a737ecfe38506665c488e1ba16

query II rowsort label-4000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 761)
----
146 values hashing to 34395415918816e519fde731da483ac3

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab1_840
----
54 values hashing to 70de56a737ecfe38506665c488e1ba16

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab1_840
----
146 values hashing to 34395415918816e519fde731da483ac3

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 761 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 761)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_840 UNION ALL SELECT pk, col0 FROM view_2_tab1_840
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 761 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 761)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_840 UNION SELECT pk, col0 FROM view_2_tab1_840
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 761 ) AS tab1_840
----
27 values hashing to e3c03bb86ea056784b60ef65ed0fc065

query I rowsort label-4000-3
SELECT * FROM view_3_tab1_840
----
27 values hashing to e3c03bb86ea056784b60ef65ed0fc065

query I rowsort label-4000-3
SELECT pk FROM tab1 WHERE col3 > 761
----
27 values hashing to e3c03bb86ea056784b60ef65ed0fc065

statement ok
DROP VIEW view_1_tab1_840

statement ok
DROP VIEW view_2_tab1_840

statement ok
DROP VIEW view_3_tab1_840

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_840') DROP VIEW view_1_tab2_840

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_840

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_840') DROP VIEW view_2_tab2_840

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_840

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_840') DROP VIEW view_3_tab2_840

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_840

statement ok
CREATE VIEW view_1_tab2_840 AS SELECT pk, col0 FROM tab2 WHERE col3 > 761

statement ok
CREATE VIEW view_2_tab2_840 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 761)

statement ok
CREATE VIEW view_3_tab2_840 AS SELECT pk FROM view_1_tab2_840

query II rowsort label-4000-1
SELECT pk, col0 FROM tab2 WHERE col3 > 761
----
54 values hashing to 70de56a737ecfe38506665c488e1ba16

query II rowsort label-4000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 761)
----
146 values hashing to 34395415918816e519fde731da483ac3

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab2_840
----
54 values hashing to 70de56a737ecfe38506665c488e1ba16

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab2_840
----
146 values hashing to 34395415918816e519fde731da483ac3

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 761 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 761)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_840 UNION ALL SELECT pk, col0 FROM view_2_tab2_840
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 761 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 761)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_840 UNION SELECT pk, col0 FROM view_2_tab2_840
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 761 ) AS tab2_840
----
27 values hashing to e3c03bb86ea056784b60ef65ed0fc065

query I rowsort label-4000-3
SELECT * FROM view_3_tab2_840
----
27 values hashing to e3c03bb86ea056784b60ef65ed0fc065

query I rowsort label-4000-3
SELECT pk FROM tab2 WHERE col3 > 761
----
27 values hashing to e3c03bb86ea056784b60ef65ed0fc065

statement ok
DROP VIEW view_1_tab2_840

statement ok
DROP VIEW view_2_tab2_840

statement ok
DROP VIEW view_3_tab2_840

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_840') DROP VIEW view_1_tab3_840

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_840

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_840') DROP VIEW view_2_tab3_840

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_840

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_840') DROP VIEW view_3_tab3_840

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_840

statement ok
CREATE VIEW view_1_tab3_840 AS SELECT pk, col0 FROM tab3 WHERE col3 > 761

statement ok
CREATE VIEW view_2_tab3_840 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 761)

statement ok
CREATE VIEW view_3_tab3_840 AS SELECT pk FROM view_1_tab3_840

query II rowsort label-4000-1
SELECT pk, col0 FROM tab3 WHERE col3 > 761
----
54 values hashing to 70de56a737ecfe38506665c488e1ba16

query II rowsort label-4000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 761)
----
146 values hashing to 34395415918816e519fde731da483ac3

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab3_840
----
54 values hashing to 70de56a737ecfe38506665c488e1ba16

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab3_840
----
146 values hashing to 34395415918816e519fde731da483ac3

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 761 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 761)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_840 UNION ALL SELECT pk, col0 FROM view_2_tab3_840
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 761 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 761)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_840 UNION SELECT pk, col0 FROM view_2_tab3_840
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 761 ) AS tab3_840
----
27 values hashing to e3c03bb86ea056784b60ef65ed0fc065

query I rowsort label-4000-3
SELECT * FROM view_3_tab3_840
----
27 values hashing to e3c03bb86ea056784b60ef65ed0fc065

query I rowsort label-4000-3
SELECT pk FROM tab3 WHERE col3 > 761
----
27 values hashing to e3c03bb86ea056784b60ef65ed0fc065

statement ok
DROP VIEW view_1_tab3_840

statement ok
DROP VIEW view_2_tab3_840

statement ok
DROP VIEW view_3_tab3_840

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_840') DROP VIEW view_1_tab4_840

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_840

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_840') DROP VIEW view_2_tab4_840

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_840

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_840') DROP VIEW view_3_tab4_840

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_840

statement ok
CREATE VIEW view_1_tab4_840 AS SELECT pk, col0 FROM tab4 WHERE col3 > 761

statement ok
CREATE VIEW view_2_tab4_840 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 761)

statement ok
CREATE VIEW view_3_tab4_840 AS SELECT pk FROM view_1_tab4_840

query II rowsort label-4000-1
SELECT pk, col0 FROM tab4 WHERE col3 > 761
----
54 values hashing to 70de56a737ecfe38506665c488e1ba16

query II rowsort label-4000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 761)
----
146 values hashing to 34395415918816e519fde731da483ac3

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab4_840
----
54 values hashing to 70de56a737ecfe38506665c488e1ba16

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab4_840
----
146 values hashing to 34395415918816e519fde731da483ac3

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 761 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 761)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_840 UNION ALL SELECT pk, col0 FROM view_2_tab4_840
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 761 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 761)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_840 UNION SELECT pk, col0 FROM view_2_tab4_840
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 761 ) AS tab4_840
----
27 values hashing to e3c03bb86ea056784b60ef65ed0fc065

query I rowsort label-4000-3
SELECT * FROM view_3_tab4_840
----
27 values hashing to e3c03bb86ea056784b60ef65ed0fc065

query I rowsort label-4000-3
SELECT pk FROM tab4 WHERE col3 > 761
----
27 values hashing to e3c03bb86ea056784b60ef65ed0fc065

statement ok
DROP VIEW view_1_tab4_840

statement ok
DROP VIEW view_2_tab4_840

statement ok
DROP VIEW view_3_tab4_840

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_841') DROP VIEW view_1_tab0_841

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_841

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_841') DROP VIEW view_2_tab0_841

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_841

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_841') DROP VIEW view_3_tab0_841

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_841

statement ok
CREATE VIEW view_1_tab0_841 AS SELECT pk, col0 FROM tab0 WHERE col3 < 718

statement ok
CREATE VIEW view_2_tab0_841 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 718)

statement ok
CREATE VIEW view_3_tab0_841 AS SELECT pk FROM view_1_tab0_841

query II rowsort label-4100-1
SELECT pk, col0 FROM tab0 WHERE col3 < 718
----
134 values hashing to 5ec19e1100133f731530d18b681753c8

query II rowsort label-4100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 718)
----
66 values hashing to 20de5329b1ec2322d5d3ea0a1a006a08

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab0_841
----
134 values hashing to 5ec19e1100133f731530d18b681753c8

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab0_841
----
66 values hashing to 20de5329b1ec2322d5d3ea0a1a006a08

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 718 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 718)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_841 UNION ALL SELECT pk, col0 FROM view_2_tab0_841
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 718 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 718)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_841 UNION SELECT pk, col0 FROM view_2_tab0_841
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 < 718 ) AS tab0_841
----
67 values hashing to cb2ebad3b31fcf5d67495117d9455def

query I rowsort label-4100-3
SELECT * FROM view_3_tab0_841
----
67 values hashing to cb2ebad3b31fcf5d67495117d9455def

query I rowsort label-4100-3
SELECT pk FROM tab0 WHERE col3 < 718
----
67 values hashing to cb2ebad3b31fcf5d67495117d9455def

statement ok
DROP VIEW view_1_tab0_841

statement ok
DROP VIEW view_2_tab0_841

statement ok
DROP VIEW view_3_tab0_841

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_841') DROP VIEW view_1_tab1_841

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_841

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_841') DROP VIEW view_2_tab1_841

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_841

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_841') DROP VIEW view_3_tab1_841

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_841

statement ok
CREATE VIEW view_1_tab1_841 AS SELECT pk, col0 FROM tab1 WHERE col3 < 718

statement ok
CREATE VIEW view_2_tab1_841 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 718)

statement ok
CREATE VIEW view_3_tab1_841 AS SELECT pk FROM view_1_tab1_841

query II rowsort label-4100-1
SELECT pk, col0 FROM tab1 WHERE col3 < 718
----
134 values hashing to 5ec19e1100133f731530d18b681753c8

query II rowsort label-4100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 718)
----
66 values hashing to 20de5329b1ec2322d5d3ea0a1a006a08

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab1_841
----
134 values hashing to 5ec19e1100133f731530d18b681753c8

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab1_841
----
66 values hashing to 20de5329b1ec2322d5d3ea0a1a006a08

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 718 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 718)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_841 UNION ALL SELECT pk, col0 FROM view_2_tab1_841
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 718 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 718)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_841 UNION SELECT pk, col0 FROM view_2_tab1_841
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 < 718 ) AS tab1_841
----
67 values hashing to cb2ebad3b31fcf5d67495117d9455def

query I rowsort label-4100-3
SELECT * FROM view_3_tab1_841
----
67 values hashing to cb2ebad3b31fcf5d67495117d9455def

query I rowsort label-4100-3
SELECT pk FROM tab1 WHERE col3 < 718
----
67 values hashing to cb2ebad3b31fcf5d67495117d9455def

statement ok
DROP VIEW view_1_tab1_841

statement ok
DROP VIEW view_2_tab1_841

statement ok
DROP VIEW view_3_tab1_841

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_841') DROP VIEW view_1_tab2_841

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_841

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_841') DROP VIEW view_2_tab2_841

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_841

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_841') DROP VIEW view_3_tab2_841

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_841

statement ok
CREATE VIEW view_1_tab2_841 AS SELECT pk, col0 FROM tab2 WHERE col3 < 718

statement ok
CREATE VIEW view_2_tab2_841 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 718)

statement ok
CREATE VIEW view_3_tab2_841 AS SELECT pk FROM view_1_tab2_841

query II rowsort label-4100-1
SELECT pk, col0 FROM tab2 WHERE col3 < 718
----
134 values hashing to 5ec19e1100133f731530d18b681753c8

query II rowsort label-4100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 718)
----
66 values hashing to 20de5329b1ec2322d5d3ea0a1a006a08

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab2_841
----
134 values hashing to 5ec19e1100133f731530d18b681753c8

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab2_841
----
66 values hashing to 20de5329b1ec2322d5d3ea0a1a006a08

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 718 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 718)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_841 UNION ALL SELECT pk, col0 FROM view_2_tab2_841
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 718 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 718)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_841 UNION SELECT pk, col0 FROM view_2_tab2_841
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 < 718 ) AS tab2_841
----
67 values hashing to cb2ebad3b31fcf5d67495117d9455def

query I rowsort label-4100-3
SELECT * FROM view_3_tab2_841
----
67 values hashing to cb2ebad3b31fcf5d67495117d9455def

query I rowsort label-4100-3
SELECT pk FROM tab2 WHERE col3 < 718
----
67 values hashing to cb2ebad3b31fcf5d67495117d9455def

statement ok
DROP VIEW view_1_tab2_841

statement ok
DROP VIEW view_2_tab2_841

statement ok
DROP VIEW view_3_tab2_841

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_841') DROP VIEW view_1_tab3_841

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_841

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_841') DROP VIEW view_2_tab3_841

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_841

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_841') DROP VIEW view_3_tab3_841

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_841

statement ok
CREATE VIEW view_1_tab3_841 AS SELECT pk, col0 FROM tab3 WHERE col3 < 718

statement ok
CREATE VIEW view_2_tab3_841 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 718)

statement ok
CREATE VIEW view_3_tab3_841 AS SELECT pk FROM view_1_tab3_841

query II rowsort label-4100-1
SELECT pk, col0 FROM tab3 WHERE col3 < 718
----
134 values hashing to 5ec19e1100133f731530d18b681753c8

query II rowsort label-4100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 718)
----
66 values hashing to 20de5329b1ec2322d5d3ea0a1a006a08

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab3_841
----
134 values hashing to 5ec19e1100133f731530d18b681753c8

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab3_841
----
66 values hashing to 20de5329b1ec2322d5d3ea0a1a006a08

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 718 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 718)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_841 UNION ALL SELECT pk, col0 FROM view_2_tab3_841
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 718 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 718)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_841 UNION SELECT pk, col0 FROM view_2_tab3_841
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 < 718 ) AS tab3_841
----
67 values hashing to cb2ebad3b31fcf5d67495117d9455def

query I rowsort label-4100-3
SELECT * FROM view_3_tab3_841
----
67 values hashing to cb2ebad3b31fcf5d67495117d9455def

query I rowsort label-4100-3
SELECT pk FROM tab3 WHERE col3 < 718
----
67 values hashing to cb2ebad3b31fcf5d67495117d9455def

statement ok
DROP VIEW view_1_tab3_841

statement ok
DROP VIEW view_2_tab3_841

statement ok
DROP VIEW view_3_tab3_841

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_841') DROP VIEW view_1_tab4_841

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_841

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_841') DROP VIEW view_2_tab4_841

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_841

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_841') DROP VIEW view_3_tab4_841

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_841

statement ok
CREATE VIEW view_1_tab4_841 AS SELECT pk, col0 FROM tab4 WHERE col3 < 718

statement ok
CREATE VIEW view_2_tab4_841 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 718)

statement ok
CREATE VIEW view_3_tab4_841 AS SELECT pk FROM view_1_tab4_841

query II rowsort label-4100-1
SELECT pk, col0 FROM tab4 WHERE col3 < 718
----
134 values hashing to 5ec19e1100133f731530d18b681753c8

query II rowsort label-4100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 718)
----
66 values hashing to 20de5329b1ec2322d5d3ea0a1a006a08

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab4_841
----
134 values hashing to 5ec19e1100133f731530d18b681753c8

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab4_841
----
66 values hashing to 20de5329b1ec2322d5d3ea0a1a006a08

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 718 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 718)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_841 UNION ALL SELECT pk, col0 FROM view_2_tab4_841
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 718 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 718)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_841 UNION SELECT pk, col0 FROM view_2_tab4_841
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 < 718 ) AS tab4_841
----
67 values hashing to cb2ebad3b31fcf5d67495117d9455def

query I rowsort label-4100-3
SELECT * FROM view_3_tab4_841
----
67 values hashing to cb2ebad3b31fcf5d67495117d9455def

query I rowsort label-4100-3
SELECT pk FROM tab4 WHERE col3 < 718
----
67 values hashing to cb2ebad3b31fcf5d67495117d9455def

statement ok
DROP VIEW view_1_tab4_841

statement ok
DROP VIEW view_2_tab4_841

statement ok
DROP VIEW view_3_tab4_841

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_842') DROP VIEW view_1_tab0_842

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_842

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_842') DROP VIEW view_2_tab0_842

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_842

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_842') DROP VIEW view_3_tab0_842

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_842

statement ok
CREATE VIEW view_1_tab0_842 AS SELECT pk, col0 FROM tab0 WHERE ((col0 > 377))

statement ok
CREATE VIEW view_2_tab0_842 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 377)))

statement ok
CREATE VIEW view_3_tab0_842 AS SELECT pk FROM view_1_tab0_842

query II rowsort label-4200-1
SELECT pk, col0 FROM tab0 WHERE ((col0 > 377))
----
136 values hashing to c8d253f6c496f931fbfca5e7166c4966

query II rowsort label-4200-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 377)))
----
64 values hashing to 20c49d1ec4ced453220f699dba990a95

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab0_842
----
136 values hashing to c8d253f6c496f931fbfca5e7166c4966

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab0_842
----
64 values hashing to 20c49d1ec4ced453220f699dba990a95

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 > 377)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 377)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_842 UNION ALL SELECT pk, col0 FROM view_2_tab0_842
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 > 377)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 377)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_842 UNION SELECT pk, col0 FROM view_2_tab0_842
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 > 377)) ) AS tab0_842
----
68 values hashing to 370d3b50fb73a34e3c099722326f064b

query I rowsort label-4200-3
SELECT * FROM view_3_tab0_842
----
68 values hashing to 370d3b50fb73a34e3c099722326f064b

query I rowsort label-4200-3
SELECT pk FROM tab0 WHERE ((col0 > 377))
----
68 values hashing to 370d3b50fb73a34e3c099722326f064b

statement ok
DROP VIEW view_1_tab0_842

statement ok
DROP VIEW view_2_tab0_842

statement ok
DROP VIEW view_3_tab0_842

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_842') DROP VIEW view_1_tab1_842

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_842

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_842') DROP VIEW view_2_tab1_842

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_842

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_842') DROP VIEW view_3_tab1_842

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_842

statement ok
CREATE VIEW view_1_tab1_842 AS SELECT pk, col0 FROM tab1 WHERE ((col0 > 377))

statement ok
CREATE VIEW view_2_tab1_842 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 377)))

statement ok
CREATE VIEW view_3_tab1_842 AS SELECT pk FROM view_1_tab1_842

query II rowsort label-4200-1
SELECT pk, col0 FROM tab1 WHERE ((col0 > 377))
----
136 values hashing to c8d253f6c496f931fbfca5e7166c4966

query II rowsort label-4200-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 377)))
----
64 values hashing to 20c49d1ec4ced453220f699dba990a95

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab1_842
----
136 values hashing to c8d253f6c496f931fbfca5e7166c4966

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab1_842
----
64 values hashing to 20c49d1ec4ced453220f699dba990a95

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 > 377)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 377)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_842 UNION ALL SELECT pk, col0 FROM view_2_tab1_842
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 > 377)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 377)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_842 UNION SELECT pk, col0 FROM view_2_tab1_842
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 > 377)) ) AS tab1_842
----
68 values hashing to 370d3b50fb73a34e3c099722326f064b

query I rowsort label-4200-3
SELECT * FROM view_3_tab1_842
----
68 values hashing to 370d3b50fb73a34e3c099722326f064b

query I rowsort label-4200-3
SELECT pk FROM tab1 WHERE ((col0 > 377))
----
68 values hashing to 370d3b50fb73a34e3c099722326f064b

statement ok
DROP VIEW view_1_tab1_842

statement ok
DROP VIEW view_2_tab1_842

statement ok
DROP VIEW view_3_tab1_842

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_842') DROP VIEW view_1_tab2_842

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_842

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_842') DROP VIEW view_2_tab2_842

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_842

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_842') DROP VIEW view_3_tab2_842

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_842

statement ok
CREATE VIEW view_1_tab2_842 AS SELECT pk, col0 FROM tab2 WHERE ((col0 > 377))

statement ok
CREATE VIEW view_2_tab2_842 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 377)))

statement ok
CREATE VIEW view_3_tab2_842 AS SELECT pk FROM view_1_tab2_842

query II rowsort label-4200-1
SELECT pk, col0 FROM tab2 WHERE ((col0 > 377))
----
136 values hashing to c8d253f6c496f931fbfca5e7166c4966

query II rowsort label-4200-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 377)))
----
64 values hashing to 20c49d1ec4ced453220f699dba990a95

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab2_842
----
136 values hashing to c8d253f6c496f931fbfca5e7166c4966

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab2_842
----
64 values hashing to 20c49d1ec4ced453220f699dba990a95

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 > 377)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 377)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_842 UNION ALL SELECT pk, col0 FROM view_2_tab2_842
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 > 377)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 377)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_842 UNION SELECT pk, col0 FROM view_2_tab2_842
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 > 377)) ) AS tab2_842
----
68 values hashing to 370d3b50fb73a34e3c099722326f064b

query I rowsort label-4200-3
SELECT * FROM view_3_tab2_842
----
68 values hashing to 370d3b50fb73a34e3c099722326f064b

query I rowsort label-4200-3
SELECT pk FROM tab2 WHERE ((col0 > 377))
----
68 values hashing to 370d3b50fb73a34e3c099722326f064b

statement ok
DROP VIEW view_1_tab2_842

statement ok
DROP VIEW view_2_tab2_842

statement ok
DROP VIEW view_3_tab2_842

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_842') DROP VIEW view_1_tab3_842

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_842

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_842') DROP VIEW view_2_tab3_842

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_842

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_842') DROP VIEW view_3_tab3_842

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_842

statement ok
CREATE VIEW view_1_tab3_842 AS SELECT pk, col0 FROM tab3 WHERE ((col0 > 377))

statement ok
CREATE VIEW view_2_tab3_842 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 377)))

statement ok
CREATE VIEW view_3_tab3_842 AS SELECT pk FROM view_1_tab3_842

query II rowsort label-4200-1
SELECT pk, col0 FROM tab3 WHERE ((col0 > 377))
----
136 values hashing to c8d253f6c496f931fbfca5e7166c4966

query II rowsort label-4200-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 377)))
----
64 values hashing to 20c49d1ec4ced453220f699dba990a95

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab3_842
----
136 values hashing to c8d253f6c496f931fbfca5e7166c4966

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab3_842
----
64 values hashing to 20c49d1ec4ced453220f699dba990a95

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 > 377)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 377)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_842 UNION ALL SELECT pk, col0 FROM view_2_tab3_842
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 > 377)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 377)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_842 UNION SELECT pk, col0 FROM view_2_tab3_842
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 > 377)) ) AS tab3_842
----
68 values hashing to 370d3b50fb73a34e3c099722326f064b

query I rowsort label-4200-3
SELECT * FROM view_3_tab3_842
----
68 values hashing to 370d3b50fb73a34e3c099722326f064b

query I rowsort label-4200-3
SELECT pk FROM tab3 WHERE ((col0 > 377))
----
68 values hashing to 370d3b50fb73a34e3c099722326f064b

statement ok
DROP VIEW view_1_tab3_842

statement ok
DROP VIEW view_2_tab3_842

statement ok
DROP VIEW view_3_tab3_842

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_842') DROP VIEW view_1_tab4_842

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_842

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_842') DROP VIEW view_2_tab4_842

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_842

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_842') DROP VIEW view_3_tab4_842

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_842

statement ok
CREATE VIEW view_1_tab4_842 AS SELECT pk, col0 FROM tab4 WHERE ((col0 > 377))

statement ok
CREATE VIEW view_2_tab4_842 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 377)))

statement ok
CREATE VIEW view_3_tab4_842 AS SELECT pk FROM view_1_tab4_842

query II rowsort label-4200-1
SELECT pk, col0 FROM tab4 WHERE ((col0 > 377))
----
136 values hashing to c8d253f6c496f931fbfca5e7166c4966

query II rowsort label-4200-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 377)))
----
64 values hashing to 20c49d1ec4ced453220f699dba990a95

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab4_842
----
136 values hashing to c8d253f6c496f931fbfca5e7166c4966

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab4_842
----
64 values hashing to 20c49d1ec4ced453220f699dba990a95

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 > 377)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 377)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_842 UNION ALL SELECT pk, col0 FROM view_2_tab4_842
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 > 377)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 377)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_842 UNION SELECT pk, col0 FROM view_2_tab4_842
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 > 377)) ) AS tab4_842
----
68 values hashing to 370d3b50fb73a34e3c099722326f064b

query I rowsort label-4200-3
SELECT * FROM view_3_tab4_842
----
68 values hashing to 370d3b50fb73a34e3c099722326f064b

query I rowsort label-4200-3
SELECT pk FROM tab4 WHERE ((col0 > 377))
----
68 values hashing to 370d3b50fb73a34e3c099722326f064b

statement ok
DROP VIEW view_1_tab4_842

statement ok
DROP VIEW view_2_tab4_842

statement ok
DROP VIEW view_3_tab4_842

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_843') DROP VIEW view_1_tab0_843

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_843

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_843') DROP VIEW view_2_tab0_843

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_843

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_843') DROP VIEW view_3_tab0_843

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_843

statement ok
CREATE VIEW view_1_tab0_843 AS SELECT pk, col0 FROM tab0 WHERE col4 <= 776.29

statement ok
CREATE VIEW view_2_tab0_843 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 776.29)

statement ok
CREATE VIEW view_3_tab0_843 AS SELECT pk FROM view_1_tab0_843

query II rowsort label-4300-1
SELECT pk, col0 FROM tab0 WHERE col4 <= 776.29
----
156 values hashing to a5f5806e94d9bb2f7ca77835bcf699bd

query II rowsort label-4300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 776.29)
----
44 values hashing to 814f07e95a3ab3219550d20c78bd5371

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab0_843
----
156 values hashing to a5f5806e94d9bb2f7ca77835bcf699bd

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab0_843
----
44 values hashing to 814f07e95a3ab3219550d20c78bd5371

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 <= 776.29 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 776.29)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_843 UNION ALL SELECT pk, col0 FROM view_2_tab0_843
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 <= 776.29 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 776.29)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_843 UNION SELECT pk, col0 FROM view_2_tab0_843
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 <= 776.29 ) AS tab0_843
----
78 values hashing to 662725f9cb5319478c2f3dd34597dddc

query I rowsort label-4300-3
SELECT * FROM view_3_tab0_843
----
78 values hashing to 662725f9cb5319478c2f3dd34597dddc

query I rowsort label-4300-3
SELECT pk FROM tab0 WHERE col4 <= 776.29
----
78 values hashing to 662725f9cb5319478c2f3dd34597dddc

statement ok
DROP VIEW view_1_tab0_843

statement ok
DROP VIEW view_2_tab0_843

statement ok
DROP VIEW view_3_tab0_843

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_843') DROP VIEW view_1_tab1_843

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_843

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_843') DROP VIEW view_2_tab1_843

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_843

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_843') DROP VIEW view_3_tab1_843

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_843

statement ok
CREATE VIEW view_1_tab1_843 AS SELECT pk, col0 FROM tab1 WHERE col4 <= 776.29

statement ok
CREATE VIEW view_2_tab1_843 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 776.29)

statement ok
CREATE VIEW view_3_tab1_843 AS SELECT pk FROM view_1_tab1_843

query II rowsort label-4300-1
SELECT pk, col0 FROM tab1 WHERE col4 <= 776.29
----
156 values hashing to a5f5806e94d9bb2f7ca77835bcf699bd

query II rowsort label-4300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 776.29)
----
44 values hashing to 814f07e95a3ab3219550d20c78bd5371

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab1_843
----
156 values hashing to a5f5806e94d9bb2f7ca77835bcf699bd

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab1_843
----
44 values hashing to 814f07e95a3ab3219550d20c78bd5371

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 <= 776.29 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 776.29)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_843 UNION ALL SELECT pk, col0 FROM view_2_tab1_843
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 <= 776.29 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 776.29)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_843 UNION SELECT pk, col0 FROM view_2_tab1_843
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 <= 776.29 ) AS tab1_843
----
78 values hashing to 662725f9cb5319478c2f3dd34597dddc

query I rowsort label-4300-3
SELECT * FROM view_3_tab1_843
----
78 values hashing to 662725f9cb5319478c2f3dd34597dddc

query I rowsort label-4300-3
SELECT pk FROM tab1 WHERE col4 <= 776.29
----
78 values hashing to 662725f9cb5319478c2f3dd34597dddc

statement ok
DROP VIEW view_1_tab1_843

statement ok
DROP VIEW view_2_tab1_843

statement ok
DROP VIEW view_3_tab1_843

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_843') DROP VIEW view_1_tab2_843

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_843

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_843') DROP VIEW view_2_tab2_843

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_843

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_843') DROP VIEW view_3_tab2_843

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_843

statement ok
CREATE VIEW view_1_tab2_843 AS SELECT pk, col0 FROM tab2 WHERE col4 <= 776.29

statement ok
CREATE VIEW view_2_tab2_843 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 776.29)

statement ok
CREATE VIEW view_3_tab2_843 AS SELECT pk FROM view_1_tab2_843

query II rowsort label-4300-1
SELECT pk, col0 FROM tab2 WHERE col4 <= 776.29
----
156 values hashing to a5f5806e94d9bb2f7ca77835bcf699bd

query II rowsort label-4300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 776.29)
----
44 values hashing to 814f07e95a3ab3219550d20c78bd5371

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab2_843
----
156 values hashing to a5f5806e94d9bb2f7ca77835bcf699bd

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab2_843
----
44 values hashing to 814f07e95a3ab3219550d20c78bd5371

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 <= 776.29 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 776.29)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_843 UNION ALL SELECT pk, col0 FROM view_2_tab2_843
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 <= 776.29 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 776.29)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_843 UNION SELECT pk, col0 FROM view_2_tab2_843
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 <= 776.29 ) AS tab2_843
----
78 values hashing to 662725f9cb5319478c2f3dd34597dddc

query I rowsort label-4300-3
SELECT * FROM view_3_tab2_843
----
78 values hashing to 662725f9cb5319478c2f3dd34597dddc

query I rowsort label-4300-3
SELECT pk FROM tab2 WHERE col4 <= 776.29
----
78 values hashing to 662725f9cb5319478c2f3dd34597dddc

statement ok
DROP VIEW view_1_tab2_843

statement ok
DROP VIEW view_2_tab2_843

statement ok
DROP VIEW view_3_tab2_843

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_843') DROP VIEW view_1_tab3_843

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_843

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_843') DROP VIEW view_2_tab3_843

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_843

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_843') DROP VIEW view_3_tab3_843

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_843

statement ok
CREATE VIEW view_1_tab3_843 AS SELECT pk, col0 FROM tab3 WHERE col4 <= 776.29

statement ok
CREATE VIEW view_2_tab3_843 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 776.29)

statement ok
CREATE VIEW view_3_tab3_843 AS SELECT pk FROM view_1_tab3_843

query II rowsort label-4300-1
SELECT pk, col0 FROM tab3 WHERE col4 <= 776.29
----
156 values hashing to a5f5806e94d9bb2f7ca77835bcf699bd

query II rowsort label-4300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 776.29)
----
44 values hashing to 814f07e95a3ab3219550d20c78bd5371

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab3_843
----
156 values hashing to a5f5806e94d9bb2f7ca77835bcf699bd

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab3_843
----
44 values hashing to 814f07e95a3ab3219550d20c78bd5371

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 <= 776.29 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 776.29)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_843 UNION ALL SELECT pk, col0 FROM view_2_tab3_843
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 <= 776.29 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 776.29)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_843 UNION SELECT pk, col0 FROM view_2_tab3_843
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 <= 776.29 ) AS tab3_843
----
78 values hashing to 662725f9cb5319478c2f3dd34597dddc

query I rowsort label-4300-3
SELECT * FROM view_3_tab3_843
----
78 values hashing to 662725f9cb5319478c2f3dd34597dddc

query I rowsort label-4300-3
SELECT pk FROM tab3 WHERE col4 <= 776.29
----
78 values hashing to 662725f9cb5319478c2f3dd34597dddc

statement ok
DROP VIEW view_1_tab3_843

statement ok
DROP VIEW view_2_tab3_843

statement ok
DROP VIEW view_3_tab3_843

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_843') DROP VIEW view_1_tab4_843

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_843

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_843') DROP VIEW view_2_tab4_843

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_843

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_843') DROP VIEW view_3_tab4_843

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_843

statement ok
CREATE VIEW view_1_tab4_843 AS SELECT pk, col0 FROM tab4 WHERE col4 <= 776.29

statement ok
CREATE VIEW view_2_tab4_843 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 776.29)

statement ok
CREATE VIEW view_3_tab4_843 AS SELECT pk FROM view_1_tab4_843

query II rowsort label-4300-1
SELECT pk, col0 FROM tab4 WHERE col4 <= 776.29
----
156 values hashing to a5f5806e94d9bb2f7ca77835bcf699bd

query II rowsort label-4300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 776.29)
----
44 values hashing to 814f07e95a3ab3219550d20c78bd5371

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab4_843
----
156 values hashing to a5f5806e94d9bb2f7ca77835bcf699bd

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab4_843
----
44 values hashing to 814f07e95a3ab3219550d20c78bd5371

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 <= 776.29 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 776.29)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_843 UNION ALL SELECT pk, col0 FROM view_2_tab4_843
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 <= 776.29 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 776.29)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_843 UNION SELECT pk, col0 FROM view_2_tab4_843
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 <= 776.29 ) AS tab4_843
----
78 values hashing to 662725f9cb5319478c2f3dd34597dddc

query I rowsort label-4300-3
SELECT * FROM view_3_tab4_843
----
78 values hashing to 662725f9cb5319478c2f3dd34597dddc

query I rowsort label-4300-3
SELECT pk FROM tab4 WHERE col4 <= 776.29
----
78 values hashing to 662725f9cb5319478c2f3dd34597dddc

statement ok
DROP VIEW view_1_tab4_843

statement ok
DROP VIEW view_2_tab4_843

statement ok
DROP VIEW view_3_tab4_843

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_844') DROP VIEW view_1_tab0_844

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_844

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_844') DROP VIEW view_2_tab0_844

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_844

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_844') DROP VIEW view_3_tab0_844

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_844

statement ok
CREATE VIEW view_1_tab0_844 AS SELECT pk, col0 FROM tab0 WHERE col3 > 216 AND ((col3 >= 345))

statement ok
CREATE VIEW view_2_tab0_844 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 216 AND ((col3 >= 345)))

statement ok
CREATE VIEW view_3_tab0_844 AS SELECT pk FROM view_1_tab0_844

query II rowsort label-4400-1
SELECT pk, col0 FROM tab0 WHERE col3 > 216 AND ((col3 >= 345))
----
140 values hashing to 306f87a23f7c84160b185388f041294b

query II rowsort label-4400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 216 AND ((col3 >= 345)))
----
60 values hashing to 5532d6474cd77c35503ba09701801971

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab0_844
----
140 values hashing to 306f87a23f7c84160b185388f041294b

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab0_844
----
60 values hashing to 5532d6474cd77c35503ba09701801971

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 216 AND ((col3 >= 345)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 216 AND ((col3 >= 345)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_844 UNION ALL SELECT pk, col0 FROM view_2_tab0_844
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 216 AND ((col3 >= 345)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 216 AND ((col3 >= 345)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_844 UNION SELECT pk, col0 FROM view_2_tab0_844
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 216 AND ((col3 >= 345)) ) AS tab0_844
----
70 values hashing to 51f73b98a243cf85cbaeeebfd6326395

query I rowsort label-4400-3
SELECT * FROM view_3_tab0_844
----
70 values hashing to 51f73b98a243cf85cbaeeebfd6326395

query I rowsort label-4400-3
SELECT pk FROM tab0 WHERE col3 > 216 AND ((col3 >= 345))
----
70 values hashing to 51f73b98a243cf85cbaeeebfd6326395

statement ok
DROP VIEW view_1_tab0_844

statement ok
DROP VIEW view_2_tab0_844

statement ok
DROP VIEW view_3_tab0_844

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_844') DROP VIEW view_1_tab1_844

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_844

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_844') DROP VIEW view_2_tab1_844

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_844

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_844') DROP VIEW view_3_tab1_844

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_844

statement ok
CREATE VIEW view_1_tab1_844 AS SELECT pk, col0 FROM tab1 WHERE col3 > 216 AND ((col3 >= 345))

statement ok
CREATE VIEW view_2_tab1_844 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 216 AND ((col3 >= 345)))

statement ok
CREATE VIEW view_3_tab1_844 AS SELECT pk FROM view_1_tab1_844

query II rowsort label-4400-1
SELECT pk, col0 FROM tab1 WHERE col3 > 216 AND ((col3 >= 345))
----
140 values hashing to 306f87a23f7c84160b185388f041294b

query II rowsort label-4400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 216 AND ((col3 >= 345)))
----
60 values hashing to 5532d6474cd77c35503ba09701801971

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab1_844
----
140 values hashing to 306f87a23f7c84160b185388f041294b

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab1_844
----
60 values hashing to 5532d6474cd77c35503ba09701801971

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 216 AND ((col3 >= 345)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 216 AND ((col3 >= 345)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_844 UNION ALL SELECT pk, col0 FROM view_2_tab1_844
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 216 AND ((col3 >= 345)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 216 AND ((col3 >= 345)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_844 UNION SELECT pk, col0 FROM view_2_tab1_844
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 216 AND ((col3 >= 345)) ) AS tab1_844
----
70 values hashing to 51f73b98a243cf85cbaeeebfd6326395

query I rowsort label-4400-3
SELECT * FROM view_3_tab1_844
----
70 values hashing to 51f73b98a243cf85cbaeeebfd6326395

query I rowsort label-4400-3
SELECT pk FROM tab1 WHERE col3 > 216 AND ((col3 >= 345))
----
70 values hashing to 51f73b98a243cf85cbaeeebfd6326395

statement ok
DROP VIEW view_1_tab1_844

statement ok
DROP VIEW view_2_tab1_844

statement ok
DROP VIEW view_3_tab1_844

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_844') DROP VIEW view_1_tab2_844

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_844

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_844') DROP VIEW view_2_tab2_844

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_844

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_844') DROP VIEW view_3_tab2_844

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_844

statement ok
CREATE VIEW view_1_tab2_844 AS SELECT pk, col0 FROM tab2 WHERE col3 > 216 AND ((col3 >= 345))

statement ok
CREATE VIEW view_2_tab2_844 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 216 AND ((col3 >= 345)))

statement ok
CREATE VIEW view_3_tab2_844 AS SELECT pk FROM view_1_tab2_844

query II rowsort label-4400-1
SELECT pk, col0 FROM tab2 WHERE col3 > 216 AND ((col3 >= 345))
----
140 values hashing to 306f87a23f7c84160b185388f041294b

query II rowsort label-4400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 216 AND ((col3 >= 345)))
----
60 values hashing to 5532d6474cd77c35503ba09701801971

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab2_844
----
140 values hashing to 306f87a23f7c84160b185388f041294b

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab2_844
----
60 values hashing to 5532d6474cd77c35503ba09701801971

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 216 AND ((col3 >= 345)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 216 AND ((col3 >= 345)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_844 UNION ALL SELECT pk, col0 FROM view_2_tab2_844
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 216 AND ((col3 >= 345)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 216 AND ((col3 >= 345)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_844 UNION SELECT pk, col0 FROM view_2_tab2_844
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 216 AND ((col3 >= 345)) ) AS tab2_844
----
70 values hashing to 51f73b98a243cf85cbaeeebfd6326395

query I rowsort label-4400-3
SELECT * FROM view_3_tab2_844
----
70 values hashing to 51f73b98a243cf85cbaeeebfd6326395

query I rowsort label-4400-3
SELECT pk FROM tab2 WHERE col3 > 216 AND ((col3 >= 345))
----
70 values hashing to 51f73b98a243cf85cbaeeebfd6326395

statement ok
DROP VIEW view_1_tab2_844

statement ok
DROP VIEW view_2_tab2_844

statement ok
DROP VIEW view_3_tab2_844

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_844') DROP VIEW view_1_tab3_844

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_844

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_844') DROP VIEW view_2_tab3_844

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_844

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_844') DROP VIEW view_3_tab3_844

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_844

statement ok
CREATE VIEW view_1_tab3_844 AS SELECT pk, col0 FROM tab3 WHERE col3 > 216 AND ((col3 >= 345))

statement ok
CREATE VIEW view_2_tab3_844 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 216 AND ((col3 >= 345)))

statement ok
CREATE VIEW view_3_tab3_844 AS SELECT pk FROM view_1_tab3_844

query II rowsort label-4400-1
SELECT pk, col0 FROM tab3 WHERE col3 > 216 AND ((col3 >= 345))
----
140 values hashing to 306f87a23f7c84160b185388f041294b

query II rowsort label-4400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 216 AND ((col3 >= 345)))
----
60 values hashing to 5532d6474cd77c35503ba09701801971

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab3_844
----
140 values hashing to 306f87a23f7c84160b185388f041294b

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab3_844
----
60 values hashing to 5532d6474cd77c35503ba09701801971

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 216 AND ((col3 >= 345)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 216 AND ((col3 >= 345)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_844 UNION ALL SELECT pk, col0 FROM view_2_tab3_844
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 216 AND ((col3 >= 345)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 216 AND ((col3 >= 345)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_844 UNION SELECT pk, col0 FROM view_2_tab3_844
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 216 AND ((col3 >= 345)) ) AS tab3_844
----
70 values hashing to 51f73b98a243cf85cbaeeebfd6326395

query I rowsort label-4400-3
SELECT * FROM view_3_tab3_844
----
70 values hashing to 51f73b98a243cf85cbaeeebfd6326395

query I rowsort label-4400-3
SELECT pk FROM tab3 WHERE col3 > 216 AND ((col3 >= 345))
----
70 values hashing to 51f73b98a243cf85cbaeeebfd6326395

statement ok
DROP VIEW view_1_tab3_844

statement ok
DROP VIEW view_2_tab3_844

statement ok
DROP VIEW view_3_tab3_844

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_844') DROP VIEW view_1_tab4_844

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_844

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_844') DROP VIEW view_2_tab4_844

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_844

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_844') DROP VIEW view_3_tab4_844

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_844

statement ok
CREATE VIEW view_1_tab4_844 AS SELECT pk, col0 FROM tab4 WHERE col3 > 216 AND ((col3 >= 345))

statement ok
CREATE VIEW view_2_tab4_844 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 216 AND ((col3 >= 345)))

statement ok
CREATE VIEW view_3_tab4_844 AS SELECT pk FROM view_1_tab4_844

query II rowsort label-4400-1
SELECT pk, col0 FROM tab4 WHERE col3 > 216 AND ((col3 >= 345))
----
140 values hashing to 306f87a23f7c84160b185388f041294b

query II rowsort label-4400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 216 AND ((col3 >= 345)))
----
60 values hashing to 5532d6474cd77c35503ba09701801971

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab4_844
----
140 values hashing to 306f87a23f7c84160b185388f041294b

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab4_844
----
60 values hashing to 5532d6474cd77c35503ba09701801971

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 216 AND ((col3 >= 345)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 216 AND ((col3 >= 345)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_844 UNION ALL SELECT pk, col0 FROM view_2_tab4_844
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 216 AND ((col3 >= 345)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 216 AND ((col3 >= 345)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_844 UNION SELECT pk, col0 FROM view_2_tab4_844
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 216 AND ((col3 >= 345)) ) AS tab4_844
----
70 values hashing to 51f73b98a243cf85cbaeeebfd6326395

query I rowsort label-4400-3
SELECT * FROM view_3_tab4_844
----
70 values hashing to 51f73b98a243cf85cbaeeebfd6326395

query I rowsort label-4400-3
SELECT pk FROM tab4 WHERE col3 > 216 AND ((col3 >= 345))
----
70 values hashing to 51f73b98a243cf85cbaeeebfd6326395

statement ok
DROP VIEW view_1_tab4_844

statement ok
DROP VIEW view_2_tab4_844

statement ok
DROP VIEW view_3_tab4_844

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_845') DROP VIEW view_1_tab0_845

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_845

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_845') DROP VIEW view_2_tab0_845

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_845

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_845') DROP VIEW view_3_tab0_845

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_845

statement ok
CREATE VIEW view_1_tab0_845 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 683

statement ok
CREATE VIEW view_2_tab0_845 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 683)

statement ok
CREATE VIEW view_3_tab0_845 AS SELECT pk FROM view_1_tab0_845

query II rowsort label-4500-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 683
----
128 values hashing to 7b1a31b9c2c5671e8f55f34607dc0918

query II rowsort label-4500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 683)
----
72 values hashing to 1931b0ccb6dd5ce96da8c97e2a27850b

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab0_845
----
128 values hashing to 7b1a31b9c2c5671e8f55f34607dc0918

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab0_845
----
72 values hashing to 1931b0ccb6dd5ce96da8c97e2a27850b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 683 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 683)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_845 UNION ALL SELECT pk, col0 FROM view_2_tab0_845
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 683 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 683)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_845 UNION SELECT pk, col0 FROM view_2_tab0_845
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 683 ) AS tab0_845
----
64 values hashing to a7bcc09fe1a636c8ef1e759416222c83

query I rowsort label-4500-3
SELECT * FROM view_3_tab0_845
----
64 values hashing to a7bcc09fe1a636c8ef1e759416222c83

query I rowsort label-4500-3
SELECT pk FROM tab0 WHERE col3 <= 683
----
64 values hashing to a7bcc09fe1a636c8ef1e759416222c83

statement ok
DROP VIEW view_1_tab0_845

statement ok
DROP VIEW view_2_tab0_845

statement ok
DROP VIEW view_3_tab0_845

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_845') DROP VIEW view_1_tab1_845

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_845

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_845') DROP VIEW view_2_tab1_845

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_845

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_845') DROP VIEW view_3_tab1_845

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_845

statement ok
CREATE VIEW view_1_tab1_845 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 683

statement ok
CREATE VIEW view_2_tab1_845 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 683)

statement ok
CREATE VIEW view_3_tab1_845 AS SELECT pk FROM view_1_tab1_845

query II rowsort label-4500-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 683
----
128 values hashing to 7b1a31b9c2c5671e8f55f34607dc0918

query II rowsort label-4500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 683)
----
72 values hashing to 1931b0ccb6dd5ce96da8c97e2a27850b

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab1_845
----
128 values hashing to 7b1a31b9c2c5671e8f55f34607dc0918

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab1_845
----
72 values hashing to 1931b0ccb6dd5ce96da8c97e2a27850b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 683 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 683)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_845 UNION ALL SELECT pk, col0 FROM view_2_tab1_845
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 683 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 683)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_845 UNION SELECT pk, col0 FROM view_2_tab1_845
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 683 ) AS tab1_845
----
64 values hashing to a7bcc09fe1a636c8ef1e759416222c83

query I rowsort label-4500-3
SELECT * FROM view_3_tab1_845
----
64 values hashing to a7bcc09fe1a636c8ef1e759416222c83

query I rowsort label-4500-3
SELECT pk FROM tab1 WHERE col3 <= 683
----
64 values hashing to a7bcc09fe1a636c8ef1e759416222c83

statement ok
DROP VIEW view_1_tab1_845

statement ok
DROP VIEW view_2_tab1_845

statement ok
DROP VIEW view_3_tab1_845

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_845') DROP VIEW view_1_tab2_845

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_845

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_845') DROP VIEW view_2_tab2_845

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_845

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_845') DROP VIEW view_3_tab2_845

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_845

statement ok
CREATE VIEW view_1_tab2_845 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 683

statement ok
CREATE VIEW view_2_tab2_845 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 683)

statement ok
CREATE VIEW view_3_tab2_845 AS SELECT pk FROM view_1_tab2_845

query II rowsort label-4500-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 683
----
128 values hashing to 7b1a31b9c2c5671e8f55f34607dc0918

query II rowsort label-4500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 683)
----
72 values hashing to 1931b0ccb6dd5ce96da8c97e2a27850b

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab2_845
----
128 values hashing to 7b1a31b9c2c5671e8f55f34607dc0918

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab2_845
----
72 values hashing to 1931b0ccb6dd5ce96da8c97e2a27850b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 683 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 683)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_845 UNION ALL SELECT pk, col0 FROM view_2_tab2_845
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 683 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 683)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_845 UNION SELECT pk, col0 FROM view_2_tab2_845
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 683 ) AS tab2_845
----
64 values hashing to a7bcc09fe1a636c8ef1e759416222c83

query I rowsort label-4500-3
SELECT * FROM view_3_tab2_845
----
64 values hashing to a7bcc09fe1a636c8ef1e759416222c83

query I rowsort label-4500-3
SELECT pk FROM tab2 WHERE col3 <= 683
----
64 values hashing to a7bcc09fe1a636c8ef1e759416222c83

statement ok
DROP VIEW view_1_tab2_845

statement ok
DROP VIEW view_2_tab2_845

statement ok
DROP VIEW view_3_tab2_845

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_845') DROP VIEW view_1_tab3_845

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_845

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_845') DROP VIEW view_2_tab3_845

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_845

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_845') DROP VIEW view_3_tab3_845

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_845

statement ok
CREATE VIEW view_1_tab3_845 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 683

statement ok
CREATE VIEW view_2_tab3_845 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 683)

statement ok
CREATE VIEW view_3_tab3_845 AS SELECT pk FROM view_1_tab3_845

query II rowsort label-4500-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 683
----
128 values hashing to 7b1a31b9c2c5671e8f55f34607dc0918

query II rowsort label-4500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 683)
----
72 values hashing to 1931b0ccb6dd5ce96da8c97e2a27850b

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab3_845
----
128 values hashing to 7b1a31b9c2c5671e8f55f34607dc0918

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab3_845
----
72 values hashing to 1931b0ccb6dd5ce96da8c97e2a27850b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 683 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 683)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_845 UNION ALL SELECT pk, col0 FROM view_2_tab3_845
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 683 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 683)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_845 UNION SELECT pk, col0 FROM view_2_tab3_845
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 683 ) AS tab3_845
----
64 values hashing to a7bcc09fe1a636c8ef1e759416222c83

query I rowsort label-4500-3
SELECT * FROM view_3_tab3_845
----
64 values hashing to a7bcc09fe1a636c8ef1e759416222c83

query I rowsort label-4500-3
SELECT pk FROM tab3 WHERE col3 <= 683
----
64 values hashing to a7bcc09fe1a636c8ef1e759416222c83

statement ok
DROP VIEW view_1_tab3_845

statement ok
DROP VIEW view_2_tab3_845

statement ok
DROP VIEW view_3_tab3_845

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_845') DROP VIEW view_1_tab4_845

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_845

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_845') DROP VIEW view_2_tab4_845

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_845

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_845') DROP VIEW view_3_tab4_845

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_845

statement ok
CREATE VIEW view_1_tab4_845 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 683

statement ok
CREATE VIEW view_2_tab4_845 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 683)

statement ok
CREATE VIEW view_3_tab4_845 AS SELECT pk FROM view_1_tab4_845

query II rowsort label-4500-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 683
----
128 values hashing to 7b1a31b9c2c5671e8f55f34607dc0918

query II rowsort label-4500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 683)
----
72 values hashing to 1931b0ccb6dd5ce96da8c97e2a27850b

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab4_845
----
128 values hashing to 7b1a31b9c2c5671e8f55f34607dc0918

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab4_845
----
72 values hashing to 1931b0ccb6dd5ce96da8c97e2a27850b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 683 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 683)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_845 UNION ALL SELECT pk, col0 FROM view_2_tab4_845
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 683 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 683)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_845 UNION SELECT pk, col0 FROM view_2_tab4_845
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 683 ) AS tab4_845
----
64 values hashing to a7bcc09fe1a636c8ef1e759416222c83

query I rowsort label-4500-3
SELECT * FROM view_3_tab4_845
----
64 values hashing to a7bcc09fe1a636c8ef1e759416222c83

query I rowsort label-4500-3
SELECT pk FROM tab4 WHERE col3 <= 683
----
64 values hashing to a7bcc09fe1a636c8ef1e759416222c83

statement ok
DROP VIEW view_1_tab4_845

statement ok
DROP VIEW view_2_tab4_845

statement ok
DROP VIEW view_3_tab4_845

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_846') DROP VIEW view_1_tab0_846

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_846

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_846') DROP VIEW view_2_tab0_846

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_846

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_846') DROP VIEW view_3_tab0_846

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_846

statement ok
CREATE VIEW view_1_tab0_846 AS SELECT pk, col0 FROM tab0 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab0_846 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab0_846 AS SELECT pk FROM view_1_tab0_846

query II rowsort label-4600-1
SELECT pk, col0 FROM tab0 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL
----
100 values hashing to 7bbfd085fa940cfb9a19b9604bca0389

query II rowsort label-4600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)
----
100 values hashing to 4ed0ea0d3483998b80698c1d2fc006c5

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab0_846
----
100 values hashing to 7bbfd085fa940cfb9a19b9604bca0389

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab0_846
----
100 values hashing to 4ed0ea0d3483998b80698c1d2fc006c5

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_846 UNION ALL SELECT pk, col0 FROM view_2_tab0_846
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_846 UNION SELECT pk, col0 FROM view_2_tab0_846
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL ) AS tab0_846
----
50 values hashing to ef3a6a62c5a18f6e9c261cdff0811a03

query I rowsort label-4600-3
SELECT * FROM view_3_tab0_846
----
50 values hashing to ef3a6a62c5a18f6e9c261cdff0811a03

query I rowsort label-4600-3
SELECT pk FROM tab0 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL
----
50 values hashing to ef3a6a62c5a18f6e9c261cdff0811a03

statement ok
DROP VIEW view_1_tab0_846

statement ok
DROP VIEW view_2_tab0_846

statement ok
DROP VIEW view_3_tab0_846

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_846') DROP VIEW view_1_tab1_846

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_846

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_846') DROP VIEW view_2_tab1_846

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_846

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_846') DROP VIEW view_3_tab1_846

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_846

statement ok
CREATE VIEW view_1_tab1_846 AS SELECT pk, col0 FROM tab1 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab1_846 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab1_846 AS SELECT pk FROM view_1_tab1_846

query II rowsort label-4600-1
SELECT pk, col0 FROM tab1 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL
----
100 values hashing to 7bbfd085fa940cfb9a19b9604bca0389

query II rowsort label-4600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)
----
100 values hashing to 4ed0ea0d3483998b80698c1d2fc006c5

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab1_846
----
100 values hashing to 7bbfd085fa940cfb9a19b9604bca0389

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab1_846
----
100 values hashing to 4ed0ea0d3483998b80698c1d2fc006c5

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_846 UNION ALL SELECT pk, col0 FROM view_2_tab1_846
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_846 UNION SELECT pk, col0 FROM view_2_tab1_846
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL ) AS tab1_846
----
50 values hashing to ef3a6a62c5a18f6e9c261cdff0811a03

query I rowsort label-4600-3
SELECT * FROM view_3_tab1_846
----
50 values hashing to ef3a6a62c5a18f6e9c261cdff0811a03

query I rowsort label-4600-3
SELECT pk FROM tab1 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL
----
50 values hashing to ef3a6a62c5a18f6e9c261cdff0811a03

statement ok
DROP VIEW view_1_tab1_846

statement ok
DROP VIEW view_2_tab1_846

statement ok
DROP VIEW view_3_tab1_846

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_846') DROP VIEW view_1_tab2_846

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_846

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_846') DROP VIEW view_2_tab2_846

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_846

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_846') DROP VIEW view_3_tab2_846

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_846

statement ok
CREATE VIEW view_1_tab2_846 AS SELECT pk, col0 FROM tab2 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab2_846 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab2_846 AS SELECT pk FROM view_1_tab2_846

query II rowsort label-4600-1
SELECT pk, col0 FROM tab2 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL
----
100 values hashing to 7bbfd085fa940cfb9a19b9604bca0389

query II rowsort label-4600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)
----
100 values hashing to 4ed0ea0d3483998b80698c1d2fc006c5

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab2_846
----
100 values hashing to 7bbfd085fa940cfb9a19b9604bca0389

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab2_846
----
100 values hashing to 4ed0ea0d3483998b80698c1d2fc006c5

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_846 UNION ALL SELECT pk, col0 FROM view_2_tab2_846
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_846 UNION SELECT pk, col0 FROM view_2_tab2_846
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL ) AS tab2_846
----
50 values hashing to ef3a6a62c5a18f6e9c261cdff0811a03

query I rowsort label-4600-3
SELECT * FROM view_3_tab2_846
----
50 values hashing to ef3a6a62c5a18f6e9c261cdff0811a03

query I rowsort label-4600-3
SELECT pk FROM tab2 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL
----
50 values hashing to ef3a6a62c5a18f6e9c261cdff0811a03

statement ok
DROP VIEW view_1_tab2_846

statement ok
DROP VIEW view_2_tab2_846

statement ok
DROP VIEW view_3_tab2_846

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_846') DROP VIEW view_1_tab3_846

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_846

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_846') DROP VIEW view_2_tab3_846

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_846

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_846') DROP VIEW view_3_tab3_846

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_846

statement ok
CREATE VIEW view_1_tab3_846 AS SELECT pk, col0 FROM tab3 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab3_846 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab3_846 AS SELECT pk FROM view_1_tab3_846

query II rowsort label-4600-1
SELECT pk, col0 FROM tab3 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL
----
100 values hashing to 7bbfd085fa940cfb9a19b9604bca0389

query II rowsort label-4600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)
----
100 values hashing to 4ed0ea0d3483998b80698c1d2fc006c5

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab3_846
----
100 values hashing to 7bbfd085fa940cfb9a19b9604bca0389

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab3_846
----
100 values hashing to 4ed0ea0d3483998b80698c1d2fc006c5

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_846 UNION ALL SELECT pk, col0 FROM view_2_tab3_846
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_846 UNION SELECT pk, col0 FROM view_2_tab3_846
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL ) AS tab3_846
----
50 values hashing to ef3a6a62c5a18f6e9c261cdff0811a03

query I rowsort label-4600-3
SELECT * FROM view_3_tab3_846
----
50 values hashing to ef3a6a62c5a18f6e9c261cdff0811a03

query I rowsort label-4600-3
SELECT pk FROM tab3 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL
----
50 values hashing to ef3a6a62c5a18f6e9c261cdff0811a03

statement ok
DROP VIEW view_1_tab3_846

statement ok
DROP VIEW view_2_tab3_846

statement ok
DROP VIEW view_3_tab3_846

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_846') DROP VIEW view_1_tab4_846

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_846

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_846') DROP VIEW view_2_tab4_846

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_846

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_846') DROP VIEW view_3_tab4_846

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_846

statement ok
CREATE VIEW view_1_tab4_846 AS SELECT pk, col0 FROM tab4 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab4_846 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab4_846 AS SELECT pk FROM view_1_tab4_846

query II rowsort label-4600-1
SELECT pk, col0 FROM tab4 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL
----
100 values hashing to 7bbfd085fa940cfb9a19b9604bca0389

query II rowsort label-4600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)
----
100 values hashing to 4ed0ea0d3483998b80698c1d2fc006c5

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab4_846
----
100 values hashing to 7bbfd085fa940cfb9a19b9604bca0389

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab4_846
----
100 values hashing to 4ed0ea0d3483998b80698c1d2fc006c5

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_846 UNION ALL SELECT pk, col0 FROM view_2_tab4_846
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 167 AND col0 <= 716) OR col3 IS NULL)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_846 UNION SELECT pk, col0 FROM view_2_tab4_846
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL ) AS tab4_846
----
50 values hashing to ef3a6a62c5a18f6e9c261cdff0811a03

query I rowsort label-4600-3
SELECT * FROM view_3_tab4_846
----
50 values hashing to ef3a6a62c5a18f6e9c261cdff0811a03

query I rowsort label-4600-3
SELECT pk FROM tab4 WHERE (col0 > 167 AND col0 <= 716) OR col3 IS NULL
----
50 values hashing to ef3a6a62c5a18f6e9c261cdff0811a03

statement ok
DROP VIEW view_1_tab4_846

statement ok
DROP VIEW view_2_tab4_846

statement ok
DROP VIEW view_3_tab4_846

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_847') DROP VIEW view_1_tab0_847

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_847

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_847') DROP VIEW view_2_tab0_847

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_847

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_847') DROP VIEW view_3_tab0_847

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_847

statement ok
CREATE VIEW view_1_tab0_847 AS SELECT pk, col0 FROM tab0 WHERE col1 <= 772.59

statement ok
CREATE VIEW view_2_tab0_847 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 772.59)

statement ok
CREATE VIEW view_3_tab0_847 AS SELECT pk FROM view_1_tab0_847

query II rowsort label-4700-1
SELECT pk, col0 FROM tab0 WHERE col1 <= 772.59
----
162 values hashing to 731da6b2b2a1ef3e43596e57b965b1f8

query II rowsort label-4700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 772.59)
----
38 values hashing to 02050ba2c99b46e5467913c79828bc3e

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab0_847
----
162 values hashing to 731da6b2b2a1ef3e43596e57b965b1f8

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab0_847
----
38 values hashing to 02050ba2c99b46e5467913c79828bc3e

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 <= 772.59 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 772.59)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_847 UNION ALL SELECT pk, col0 FROM view_2_tab0_847
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 <= 772.59 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 772.59)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_847 UNION SELECT pk, col0 FROM view_2_tab0_847
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 <= 772.59 ) AS tab0_847
----
81 values hashing to 86c2f404f22e1fa5f808f4830f116902

query I rowsort label-4700-3
SELECT * FROM view_3_tab0_847
----
81 values hashing to 86c2f404f22e1fa5f808f4830f116902

query I rowsort label-4700-3
SELECT pk FROM tab0 WHERE col1 <= 772.59
----
81 values hashing to 86c2f404f22e1fa5f808f4830f116902

statement ok
DROP VIEW view_1_tab0_847

statement ok
DROP VIEW view_2_tab0_847

statement ok
DROP VIEW view_3_tab0_847

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_847') DROP VIEW view_1_tab1_847

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_847

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_847') DROP VIEW view_2_tab1_847

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_847

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_847') DROP VIEW view_3_tab1_847

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_847

statement ok
CREATE VIEW view_1_tab1_847 AS SELECT pk, col0 FROM tab1 WHERE col1 <= 772.59

statement ok
CREATE VIEW view_2_tab1_847 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 772.59)

statement ok
CREATE VIEW view_3_tab1_847 AS SELECT pk FROM view_1_tab1_847

query II rowsort label-4700-1
SELECT pk, col0 FROM tab1 WHERE col1 <= 772.59
----
162 values hashing to 731da6b2b2a1ef3e43596e57b965b1f8

query II rowsort label-4700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 772.59)
----
38 values hashing to 02050ba2c99b46e5467913c79828bc3e

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab1_847
----
162 values hashing to 731da6b2b2a1ef3e43596e57b965b1f8

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab1_847
----
38 values hashing to 02050ba2c99b46e5467913c79828bc3e

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 <= 772.59 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 772.59)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_847 UNION ALL SELECT pk, col0 FROM view_2_tab1_847
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 <= 772.59 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 772.59)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_847 UNION SELECT pk, col0 FROM view_2_tab1_847
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 <= 772.59 ) AS tab1_847
----
81 values hashing to 86c2f404f22e1fa5f808f4830f116902

query I rowsort label-4700-3
SELECT * FROM view_3_tab1_847
----
81 values hashing to 86c2f404f22e1fa5f808f4830f116902

query I rowsort label-4700-3
SELECT pk FROM tab1 WHERE col1 <= 772.59
----
81 values hashing to 86c2f404f22e1fa5f808f4830f116902

statement ok
DROP VIEW view_1_tab1_847

statement ok
DROP VIEW view_2_tab1_847

statement ok
DROP VIEW view_3_tab1_847

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_847') DROP VIEW view_1_tab2_847

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_847

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_847') DROP VIEW view_2_tab2_847

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_847

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_847') DROP VIEW view_3_tab2_847

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_847

statement ok
CREATE VIEW view_1_tab2_847 AS SELECT pk, col0 FROM tab2 WHERE col1 <= 772.59

statement ok
CREATE VIEW view_2_tab2_847 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 772.59)

statement ok
CREATE VIEW view_3_tab2_847 AS SELECT pk FROM view_1_tab2_847

query II rowsort label-4700-1
SELECT pk, col0 FROM tab2 WHERE col1 <= 772.59
----
162 values hashing to 731da6b2b2a1ef3e43596e57b965b1f8

query II rowsort label-4700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 772.59)
----
38 values hashing to 02050ba2c99b46e5467913c79828bc3e

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab2_847
----
162 values hashing to 731da6b2b2a1ef3e43596e57b965b1f8

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab2_847
----
38 values hashing to 02050ba2c99b46e5467913c79828bc3e

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 <= 772.59 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 772.59)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_847 UNION ALL SELECT pk, col0 FROM view_2_tab2_847
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 <= 772.59 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 772.59)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_847 UNION SELECT pk, col0 FROM view_2_tab2_847
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 <= 772.59 ) AS tab2_847
----
81 values hashing to 86c2f404f22e1fa5f808f4830f116902

query I rowsort label-4700-3
SELECT * FROM view_3_tab2_847
----
81 values hashing to 86c2f404f22e1fa5f808f4830f116902

query I rowsort label-4700-3
SELECT pk FROM tab2 WHERE col1 <= 772.59
----
81 values hashing to 86c2f404f22e1fa5f808f4830f116902

statement ok
DROP VIEW view_1_tab2_847

statement ok
DROP VIEW view_2_tab2_847

statement ok
DROP VIEW view_3_tab2_847

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_847') DROP VIEW view_1_tab3_847

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_847

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_847') DROP VIEW view_2_tab3_847

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_847

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_847') DROP VIEW view_3_tab3_847

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_847

statement ok
CREATE VIEW view_1_tab3_847 AS SELECT pk, col0 FROM tab3 WHERE col1 <= 772.59

statement ok
CREATE VIEW view_2_tab3_847 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 772.59)

statement ok
CREATE VIEW view_3_tab3_847 AS SELECT pk FROM view_1_tab3_847

query II rowsort label-4700-1
SELECT pk, col0 FROM tab3 WHERE col1 <= 772.59
----
162 values hashing to 731da6b2b2a1ef3e43596e57b965b1f8

query II rowsort label-4700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 772.59)
----
38 values hashing to 02050ba2c99b46e5467913c79828bc3e

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab3_847
----
162 values hashing to 731da6b2b2a1ef3e43596e57b965b1f8

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab3_847
----
38 values hashing to 02050ba2c99b46e5467913c79828bc3e

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 <= 772.59 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 772.59)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_847 UNION ALL SELECT pk, col0 FROM view_2_tab3_847
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 <= 772.59 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 772.59)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_847 UNION SELECT pk, col0 FROM view_2_tab3_847
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 <= 772.59 ) AS tab3_847
----
81 values hashing to 86c2f404f22e1fa5f808f4830f116902

query I rowsort label-4700-3
SELECT * FROM view_3_tab3_847
----
81 values hashing to 86c2f404f22e1fa5f808f4830f116902

query I rowsort label-4700-3
SELECT pk FROM tab3 WHERE col1 <= 772.59
----
81 values hashing to 86c2f404f22e1fa5f808f4830f116902

statement ok
DROP VIEW view_1_tab3_847

statement ok
DROP VIEW view_2_tab3_847

statement ok
DROP VIEW view_3_tab3_847

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_847') DROP VIEW view_1_tab4_847

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_847

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_847') DROP VIEW view_2_tab4_847

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_847

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_847') DROP VIEW view_3_tab4_847

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_847

statement ok
CREATE VIEW view_1_tab4_847 AS SELECT pk, col0 FROM tab4 WHERE col1 <= 772.59

statement ok
CREATE VIEW view_2_tab4_847 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 772.59)

statement ok
CREATE VIEW view_3_tab4_847 AS SELECT pk FROM view_1_tab4_847

query II rowsort label-4700-1
SELECT pk, col0 FROM tab4 WHERE col1 <= 772.59
----
162 values hashing to 731da6b2b2a1ef3e43596e57b965b1f8

query II rowsort label-4700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 772.59)
----
38 values hashing to 02050ba2c99b46e5467913c79828bc3e

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab4_847
----
162 values hashing to 731da6b2b2a1ef3e43596e57b965b1f8

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab4_847
----
38 values hashing to 02050ba2c99b46e5467913c79828bc3e

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 <= 772.59 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 772.59)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_847 UNION ALL SELECT pk, col0 FROM view_2_tab4_847
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 <= 772.59 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 772.59)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_847 UNION SELECT pk, col0 FROM view_2_tab4_847
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 <= 772.59 ) AS tab4_847
----
81 values hashing to 86c2f404f22e1fa5f808f4830f116902

query I rowsort label-4700-3
SELECT * FROM view_3_tab4_847
----
81 values hashing to 86c2f404f22e1fa5f808f4830f116902

query I rowsort label-4700-3
SELECT pk FROM tab4 WHERE col1 <= 772.59
----
81 values hashing to 86c2f404f22e1fa5f808f4830f116902

statement ok
DROP VIEW view_1_tab4_847

statement ok
DROP VIEW view_2_tab4_847

statement ok
DROP VIEW view_3_tab4_847

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_848') DROP VIEW view_1_tab0_848

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_848

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_848') DROP VIEW view_2_tab0_848

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_848

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_848') DROP VIEW view_3_tab0_848

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_848

statement ok
CREATE VIEW view_1_tab0_848 AS SELECT pk, col0 FROM tab0 WHERE (col3 > 125)

statement ok
CREATE VIEW view_2_tab0_848 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 125))

statement ok
CREATE VIEW view_3_tab0_848 AS SELECT pk FROM view_1_tab0_848

query II rowsort label-4800-1
SELECT pk, col0 FROM tab0 WHERE (col3 > 125)
----
174 values hashing to affdd6e7184562f9a032afe4ba92e1a0

query II rowsort label-4800-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 125))
----
26 values hashing to c6f2f492e2be6e81d66b4ffa4e6484c7

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab0_848
----
174 values hashing to affdd6e7184562f9a032afe4ba92e1a0

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab0_848
----
26 values hashing to c6f2f492e2be6e81d66b4ffa4e6484c7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 125) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 125))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_848 UNION ALL SELECT pk, col0 FROM view_2_tab0_848
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 125) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 125))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_848 UNION SELECT pk, col0 FROM view_2_tab0_848
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 > 125) ) AS tab0_848
----
87 values hashing to be2f79ae5942640c8aeaf9d509430f67

query I rowsort label-4800-3
SELECT * FROM view_3_tab0_848
----
87 values hashing to be2f79ae5942640c8aeaf9d509430f67

query I rowsort label-4800-3
SELECT pk FROM tab0 WHERE (col3 > 125)
----
87 values hashing to be2f79ae5942640c8aeaf9d509430f67

statement ok
DROP VIEW view_1_tab0_848

statement ok
DROP VIEW view_2_tab0_848

statement ok
DROP VIEW view_3_tab0_848

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_848') DROP VIEW view_1_tab1_848

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_848

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_848') DROP VIEW view_2_tab1_848

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_848

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_848') DROP VIEW view_3_tab1_848

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_848

statement ok
CREATE VIEW view_1_tab1_848 AS SELECT pk, col0 FROM tab1 WHERE (col3 > 125)

statement ok
CREATE VIEW view_2_tab1_848 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 125))

statement ok
CREATE VIEW view_3_tab1_848 AS SELECT pk FROM view_1_tab1_848

query II rowsort label-4800-1
SELECT pk, col0 FROM tab1 WHERE (col3 > 125)
----
174 values hashing to affdd6e7184562f9a032afe4ba92e1a0

query II rowsort label-4800-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 125))
----
26 values hashing to c6f2f492e2be6e81d66b4ffa4e6484c7

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab1_848
----
174 values hashing to affdd6e7184562f9a032afe4ba92e1a0

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab1_848
----
26 values hashing to c6f2f492e2be6e81d66b4ffa4e6484c7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 125) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 125))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_848 UNION ALL SELECT pk, col0 FROM view_2_tab1_848
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 125) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 125))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_848 UNION SELECT pk, col0 FROM view_2_tab1_848
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 > 125) ) AS tab1_848
----
87 values hashing to be2f79ae5942640c8aeaf9d509430f67

query I rowsort label-4800-3
SELECT * FROM view_3_tab1_848
----
87 values hashing to be2f79ae5942640c8aeaf9d509430f67

query I rowsort label-4800-3
SELECT pk FROM tab1 WHERE (col3 > 125)
----
87 values hashing to be2f79ae5942640c8aeaf9d509430f67

statement ok
DROP VIEW view_1_tab1_848

statement ok
DROP VIEW view_2_tab1_848

statement ok
DROP VIEW view_3_tab1_848

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_848') DROP VIEW view_1_tab2_848

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_848

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_848') DROP VIEW view_2_tab2_848

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_848

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_848') DROP VIEW view_3_tab2_848

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_848

statement ok
CREATE VIEW view_1_tab2_848 AS SELECT pk, col0 FROM tab2 WHERE (col3 > 125)

statement ok
CREATE VIEW view_2_tab2_848 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 125))

statement ok
CREATE VIEW view_3_tab2_848 AS SELECT pk FROM view_1_tab2_848

query II rowsort label-4800-1
SELECT pk, col0 FROM tab2 WHERE (col3 > 125)
----
174 values hashing to affdd6e7184562f9a032afe4ba92e1a0

query II rowsort label-4800-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 125))
----
26 values hashing to c6f2f492e2be6e81d66b4ffa4e6484c7

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab2_848
----
174 values hashing to affdd6e7184562f9a032afe4ba92e1a0

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab2_848
----
26 values hashing to c6f2f492e2be6e81d66b4ffa4e6484c7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 125) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 125))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_848 UNION ALL SELECT pk, col0 FROM view_2_tab2_848
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 125) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 125))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_848 UNION SELECT pk, col0 FROM view_2_tab2_848
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 > 125) ) AS tab2_848
----
87 values hashing to be2f79ae5942640c8aeaf9d509430f67

query I rowsort label-4800-3
SELECT * FROM view_3_tab2_848
----
87 values hashing to be2f79ae5942640c8aeaf9d509430f67

query I rowsort label-4800-3
SELECT pk FROM tab2 WHERE (col3 > 125)
----
87 values hashing to be2f79ae5942640c8aeaf9d509430f67

statement ok
DROP VIEW view_1_tab2_848

statement ok
DROP VIEW view_2_tab2_848

statement ok
DROP VIEW view_3_tab2_848

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_848') DROP VIEW view_1_tab3_848

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_848

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_848') DROP VIEW view_2_tab3_848

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_848

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_848') DROP VIEW view_3_tab3_848

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_848

statement ok
CREATE VIEW view_1_tab3_848 AS SELECT pk, col0 FROM tab3 WHERE (col3 > 125)

statement ok
CREATE VIEW view_2_tab3_848 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 125))

statement ok
CREATE VIEW view_3_tab3_848 AS SELECT pk FROM view_1_tab3_848

query II rowsort label-4800-1
SELECT pk, col0 FROM tab3 WHERE (col3 > 125)
----
174 values hashing to affdd6e7184562f9a032afe4ba92e1a0

query II rowsort label-4800-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 125))
----
26 values hashing to c6f2f492e2be6e81d66b4ffa4e6484c7

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab3_848
----
174 values hashing to affdd6e7184562f9a032afe4ba92e1a0

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab3_848
----
26 values hashing to c6f2f492e2be6e81d66b4ffa4e6484c7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 125) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 125))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_848 UNION ALL SELECT pk, col0 FROM view_2_tab3_848
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 125) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 125))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_848 UNION SELECT pk, col0 FROM view_2_tab3_848
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 > 125) ) AS tab3_848
----
87 values hashing to be2f79ae5942640c8aeaf9d509430f67

query I rowsort label-4800-3
SELECT * FROM view_3_tab3_848
----
87 values hashing to be2f79ae5942640c8aeaf9d509430f67

query I rowsort label-4800-3
SELECT pk FROM tab3 WHERE (col3 > 125)
----
87 values hashing to be2f79ae5942640c8aeaf9d509430f67

statement ok
DROP VIEW view_1_tab3_848

statement ok
DROP VIEW view_2_tab3_848

statement ok
DROP VIEW view_3_tab3_848

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_848') DROP VIEW view_1_tab4_848

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_848

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_848') DROP VIEW view_2_tab4_848

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_848

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_848') DROP VIEW view_3_tab4_848

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_848

statement ok
CREATE VIEW view_1_tab4_848 AS SELECT pk, col0 FROM tab4 WHERE (col3 > 125)

statement ok
CREATE VIEW view_2_tab4_848 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 125))

statement ok
CREATE VIEW view_3_tab4_848 AS SELECT pk FROM view_1_tab4_848

query II rowsort label-4800-1
SELECT pk, col0 FROM tab4 WHERE (col3 > 125)
----
174 values hashing to affdd6e7184562f9a032afe4ba92e1a0

query II rowsort label-4800-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 125))
----
26 values hashing to c6f2f492e2be6e81d66b4ffa4e6484c7

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab4_848
----
174 values hashing to affdd6e7184562f9a032afe4ba92e1a0

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab4_848
----
26 values hashing to c6f2f492e2be6e81d66b4ffa4e6484c7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 125) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 125))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_848 UNION ALL SELECT pk, col0 FROM view_2_tab4_848
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 125) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 125))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_848 UNION SELECT pk, col0 FROM view_2_tab4_848
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 > 125) ) AS tab4_848
----
87 values hashing to be2f79ae5942640c8aeaf9d509430f67

query I rowsort label-4800-3
SELECT * FROM view_3_tab4_848
----
87 values hashing to be2f79ae5942640c8aeaf9d509430f67

query I rowsort label-4800-3
SELECT pk FROM tab4 WHERE (col3 > 125)
----
87 values hashing to be2f79ae5942640c8aeaf9d509430f67

statement ok
DROP VIEW view_1_tab4_848

statement ok
DROP VIEW view_2_tab4_848

statement ok
DROP VIEW view_3_tab4_848

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_850') DROP VIEW view_1_tab0_850

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_850

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_850') DROP VIEW view_2_tab0_850

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_850

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_850') DROP VIEW view_3_tab0_850

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_850

statement ok
CREATE VIEW view_1_tab0_850 AS SELECT pk, col0 FROM tab0 WHERE (col1 > 978.14) OR (col0 > 568)

statement ok
CREATE VIEW view_2_tab0_850 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 978.14) OR (col0 > 568))

statement ok
CREATE VIEW view_3_tab0_850 AS SELECT pk FROM view_1_tab0_850

query II rowsort label-4900-1
SELECT pk, col0 FROM tab0 WHERE (col1 > 978.14) OR (col0 > 568)
----
96 values hashing to e9f8c7099b2d5bc2f4fb4b34cf73b414

query II rowsort label-4900-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 978.14) OR (col0 > 568))
----
104 values hashing to 8f0c22ba448037deba4329a72cfd78f2

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab0_850
----
96 values hashing to e9f8c7099b2d5bc2f4fb4b34cf73b414

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab0_850
----
104 values hashing to 8f0c22ba448037deba4329a72cfd78f2

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 > 978.14) OR (col0 > 568) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 978.14) OR (col0 > 568))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_850 UNION ALL SELECT pk, col0 FROM view_2_tab0_850
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 > 978.14) OR (col0 > 568) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 978.14) OR (col0 > 568))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_850 UNION SELECT pk, col0 FROM view_2_tab0_850
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 > 978.14) OR (col0 > 568) ) AS tab0_850
----
48 values hashing to 7d3d6f56660370936000cfa77a1d92f3

query I rowsort label-4900-3
SELECT * FROM view_3_tab0_850
----
48 values hashing to 7d3d6f56660370936000cfa77a1d92f3

query I rowsort label-4900-3
SELECT pk FROM tab0 WHERE (col1 > 978.14) OR (col0 > 568)
----
48 values hashing to 7d3d6f56660370936000cfa77a1d92f3

statement ok
DROP VIEW view_1_tab0_850

statement ok
DROP VIEW view_2_tab0_850

statement ok
DROP VIEW view_3_tab0_850

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_850') DROP VIEW view_1_tab1_850

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_850

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_850') DROP VIEW view_2_tab1_850

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_850

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_850') DROP VIEW view_3_tab1_850

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_850

statement ok
CREATE VIEW view_1_tab1_850 AS SELECT pk, col0 FROM tab1 WHERE (col1 > 978.14) OR (col0 > 568)

statement ok
CREATE VIEW view_2_tab1_850 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 978.14) OR (col0 > 568))

statement ok
CREATE VIEW view_3_tab1_850 AS SELECT pk FROM view_1_tab1_850

query II rowsort label-4900-1
SELECT pk, col0 FROM tab1 WHERE (col1 > 978.14) OR (col0 > 568)
----
96 values hashing to e9f8c7099b2d5bc2f4fb4b34cf73b414

query II rowsort label-4900-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 978.14) OR (col0 > 568))
----
104 values hashing to 8f0c22ba448037deba4329a72cfd78f2

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab1_850
----
96 values hashing to e9f8c7099b2d5bc2f4fb4b34cf73b414

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab1_850
----
104 values hashing to 8f0c22ba448037deba4329a72cfd78f2

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 > 978.14) OR (col0 > 568) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 978.14) OR (col0 > 568))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_850 UNION ALL SELECT pk, col0 FROM view_2_tab1_850
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 > 978.14) OR (col0 > 568) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 978.14) OR (col0 > 568))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_850 UNION SELECT pk, col0 FROM view_2_tab1_850
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 > 978.14) OR (col0 > 568) ) AS tab1_850
----
48 values hashing to 7d3d6f56660370936000cfa77a1d92f3

query I rowsort label-4900-3
SELECT * FROM view_3_tab1_850
----
48 values hashing to 7d3d6f56660370936000cfa77a1d92f3

query I rowsort label-4900-3
SELECT pk FROM tab1 WHERE (col1 > 978.14) OR (col0 > 568)
----
48 values hashing to 7d3d6f56660370936000cfa77a1d92f3

statement ok
DROP VIEW view_1_tab1_850

statement ok
DROP VIEW view_2_tab1_850

statement ok
DROP VIEW view_3_tab1_850

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_850') DROP VIEW view_1_tab2_850

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_850

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_850') DROP VIEW view_2_tab2_850

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_850

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_850') DROP VIEW view_3_tab2_850

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_850

statement ok
CREATE VIEW view_1_tab2_850 AS SELECT pk, col0 FROM tab2 WHERE (col1 > 978.14) OR (col0 > 568)

statement ok
CREATE VIEW view_2_tab2_850 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 978.14) OR (col0 > 568))

statement ok
CREATE VIEW view_3_tab2_850 AS SELECT pk FROM view_1_tab2_850

query II rowsort label-4900-1
SELECT pk, col0 FROM tab2 WHERE (col1 > 978.14) OR (col0 > 568)
----
96 values hashing to e9f8c7099b2d5bc2f4fb4b34cf73b414

query II rowsort label-4900-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 978.14) OR (col0 > 568))
----
104 values hashing to 8f0c22ba448037deba4329a72cfd78f2

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab2_850
----
96 values hashing to e9f8c7099b2d5bc2f4fb4b34cf73b414

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab2_850
----
104 values hashing to 8f0c22ba448037deba4329a72cfd78f2

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 > 978.14) OR (col0 > 568) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 978.14) OR (col0 > 568))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_850 UNION ALL SELECT pk, col0 FROM view_2_tab2_850
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 > 978.14) OR (col0 > 568) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 978.14) OR (col0 > 568))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_850 UNION SELECT pk, col0 FROM view_2_tab2_850
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 > 978.14) OR (col0 > 568) ) AS tab2_850
----
48 values hashing to 7d3d6f56660370936000cfa77a1d92f3

query I rowsort label-4900-3
SELECT * FROM view_3_tab2_850
----
48 values hashing to 7d3d6f56660370936000cfa77a1d92f3

query I rowsort label-4900-3
SELECT pk FROM tab2 WHERE (col1 > 978.14) OR (col0 > 568)
----
48 values hashing to 7d3d6f56660370936000cfa77a1d92f3

statement ok
DROP VIEW view_1_tab2_850

statement ok
DROP VIEW view_2_tab2_850

statement ok
DROP VIEW view_3_tab2_850

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_850') DROP VIEW view_1_tab3_850

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_850

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_850') DROP VIEW view_2_tab3_850

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_850

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_850') DROP VIEW view_3_tab3_850

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_850

statement ok
CREATE VIEW view_1_tab3_850 AS SELECT pk, col0 FROM tab3 WHERE (col1 > 978.14) OR (col0 > 568)

statement ok
CREATE VIEW view_2_tab3_850 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 978.14) OR (col0 > 568))

statement ok
CREATE VIEW view_3_tab3_850 AS SELECT pk FROM view_1_tab3_850

query II rowsort label-4900-1
SELECT pk, col0 FROM tab3 WHERE (col1 > 978.14) OR (col0 > 568)
----
96 values hashing to e9f8c7099b2d5bc2f4fb4b34cf73b414

query II rowsort label-4900-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 978.14) OR (col0 > 568))
----
104 values hashing to 8f0c22ba448037deba4329a72cfd78f2

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab3_850
----
96 values hashing to e9f8c7099b2d5bc2f4fb4b34cf73b414

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab3_850
----
104 values hashing to 8f0c22ba448037deba4329a72cfd78f2

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 > 978.14) OR (col0 > 568) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 978.14) OR (col0 > 568))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_850 UNION ALL SELECT pk, col0 FROM view_2_tab3_850
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 > 978.14) OR (col0 > 568) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 978.14) OR (col0 > 568))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_850 UNION SELECT pk, col0 FROM view_2_tab3_850
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 > 978.14) OR (col0 > 568) ) AS tab3_850
----
48 values hashing to 7d3d6f56660370936000cfa77a1d92f3

query I rowsort label-4900-3
SELECT * FROM view_3_tab3_850
----
48 values hashing to 7d3d6f56660370936000cfa77a1d92f3

query I rowsort label-4900-3
SELECT pk FROM tab3 WHERE (col1 > 978.14) OR (col0 > 568)
----
48 values hashing to 7d3d6f56660370936000cfa77a1d92f3

statement ok
DROP VIEW view_1_tab3_850

statement ok
DROP VIEW view_2_tab3_850

statement ok
DROP VIEW view_3_tab3_850

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_850') DROP VIEW view_1_tab4_850

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_850

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_850') DROP VIEW view_2_tab4_850

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_850

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_850') DROP VIEW view_3_tab4_850

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_850

statement ok
CREATE VIEW view_1_tab4_850 AS SELECT pk, col0 FROM tab4 WHERE (col1 > 978.14) OR (col0 > 568)

statement ok
CREATE VIEW view_2_tab4_850 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 978.14) OR (col0 > 568))

statement ok
CREATE VIEW view_3_tab4_850 AS SELECT pk FROM view_1_tab4_850

query II rowsort label-4900-1
SELECT pk, col0 FROM tab4 WHERE (col1 > 978.14) OR (col0 > 568)
----
96 values hashing to e9f8c7099b2d5bc2f4fb4b34cf73b414

query II rowsort label-4900-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 978.14) OR (col0 > 568))
----
104 values hashing to 8f0c22ba448037deba4329a72cfd78f2

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab4_850
----
96 values hashing to e9f8c7099b2d5bc2f4fb4b34cf73b414

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab4_850
----
104 values hashing to 8f0c22ba448037deba4329a72cfd78f2

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 > 978.14) OR (col0 > 568) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 978.14) OR (col0 > 568))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_850 UNION ALL SELECT pk, col0 FROM view_2_tab4_850
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 > 978.14) OR (col0 > 568) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 978.14) OR (col0 > 568))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_850 UNION SELECT pk, col0 FROM view_2_tab4_850
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 > 978.14) OR (col0 > 568) ) AS tab4_850
----
48 values hashing to 7d3d6f56660370936000cfa77a1d92f3

query I rowsort label-4900-3
SELECT * FROM view_3_tab4_850
----
48 values hashing to 7d3d6f56660370936000cfa77a1d92f3

query I rowsort label-4900-3
SELECT pk FROM tab4 WHERE (col1 > 978.14) OR (col0 > 568)
----
48 values hashing to 7d3d6f56660370936000cfa77a1d92f3

statement ok
DROP VIEW view_1_tab4_850

statement ok
DROP VIEW view_2_tab4_850

statement ok
DROP VIEW view_3_tab4_850

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_851') DROP VIEW view_1_tab0_851

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_851

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_851') DROP VIEW view_2_tab0_851

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_851

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_851') DROP VIEW view_3_tab0_851

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_851

statement ok
CREATE VIEW view_1_tab0_851 AS SELECT pk, col0 FROM tab0 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94))

statement ok
CREATE VIEW view_2_tab0_851 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))

statement ok
CREATE VIEW view_3_tab0_851 AS SELECT pk FROM view_1_tab0_851

query II rowsort label-5000-1
SELECT pk, col0 FROM tab0 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94))
----
60
533

query II rowsort label-5000-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))
----
198 values hashing to 3c07e78cc61b7369ad992595f16e476f

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab0_851
----
60
533

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab0_851
----
198 values hashing to 3c07e78cc61b7369ad992595f16e476f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_851 UNION ALL SELECT pk, col0 FROM view_2_tab0_851
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_851 UNION SELECT pk, col0 FROM view_2_tab0_851
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)) ) AS tab0_851
----
60

query I rowsort label-5000-3
SELECT * FROM view_3_tab0_851
----
60

query I rowsort label-5000-3
SELECT pk FROM tab0 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94))
----
60

statement ok
DROP VIEW view_1_tab0_851

statement ok
DROP VIEW view_2_tab0_851

statement ok
DROP VIEW view_3_tab0_851

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_851') DROP VIEW view_1_tab1_851

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_851

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_851') DROP VIEW view_2_tab1_851

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_851

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_851') DROP VIEW view_3_tab1_851

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_851

statement ok
CREATE VIEW view_1_tab1_851 AS SELECT pk, col0 FROM tab1 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94))

statement ok
CREATE VIEW view_2_tab1_851 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))

statement ok
CREATE VIEW view_3_tab1_851 AS SELECT pk FROM view_1_tab1_851

query II rowsort label-5000-1
SELECT pk, col0 FROM tab1 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94))
----
60
533

query II rowsort label-5000-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))
----
198 values hashing to 3c07e78cc61b7369ad992595f16e476f

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab1_851
----
60
533

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab1_851
----
198 values hashing to 3c07e78cc61b7369ad992595f16e476f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_851 UNION ALL SELECT pk, col0 FROM view_2_tab1_851
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_851 UNION SELECT pk, col0 FROM view_2_tab1_851
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)) ) AS tab1_851
----
60

query I rowsort label-5000-3
SELECT * FROM view_3_tab1_851
----
60

query I rowsort label-5000-3
SELECT pk FROM tab1 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94))
----
60

statement ok
DROP VIEW view_1_tab1_851

statement ok
DROP VIEW view_2_tab1_851

statement ok
DROP VIEW view_3_tab1_851

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_851') DROP VIEW view_1_tab2_851

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_851

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_851') DROP VIEW view_2_tab2_851

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_851

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_851') DROP VIEW view_3_tab2_851

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_851

statement ok
CREATE VIEW view_1_tab2_851 AS SELECT pk, col0 FROM tab2 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94))

statement ok
CREATE VIEW view_2_tab2_851 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))

statement ok
CREATE VIEW view_3_tab2_851 AS SELECT pk FROM view_1_tab2_851

query II rowsort label-5000-1
SELECT pk, col0 FROM tab2 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94))
----
60
533

query II rowsort label-5000-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))
----
198 values hashing to 3c07e78cc61b7369ad992595f16e476f

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab2_851
----
60
533

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab2_851
----
198 values hashing to 3c07e78cc61b7369ad992595f16e476f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_851 UNION ALL SELECT pk, col0 FROM view_2_tab2_851
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_851 UNION SELECT pk, col0 FROM view_2_tab2_851
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)) ) AS tab2_851
----
60

query I rowsort label-5000-3
SELECT * FROM view_3_tab2_851
----
60

query I rowsort label-5000-3
SELECT pk FROM tab2 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94))
----
60

statement ok
DROP VIEW view_1_tab2_851

statement ok
DROP VIEW view_2_tab2_851

statement ok
DROP VIEW view_3_tab2_851

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_851') DROP VIEW view_1_tab3_851

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_851

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_851') DROP VIEW view_2_tab3_851

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_851

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_851') DROP VIEW view_3_tab3_851

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_851

statement ok
CREATE VIEW view_1_tab3_851 AS SELECT pk, col0 FROM tab3 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94))

statement ok
CREATE VIEW view_2_tab3_851 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))

statement ok
CREATE VIEW view_3_tab3_851 AS SELECT pk FROM view_1_tab3_851

query II rowsort label-5000-1
SELECT pk, col0 FROM tab3 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94))
----
60
533

query II rowsort label-5000-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))
----
198 values hashing to 3c07e78cc61b7369ad992595f16e476f

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab3_851
----
60
533

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab3_851
----
198 values hashing to 3c07e78cc61b7369ad992595f16e476f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_851 UNION ALL SELECT pk, col0 FROM view_2_tab3_851
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_851 UNION SELECT pk, col0 FROM view_2_tab3_851
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)) ) AS tab3_851
----
60

query I rowsort label-5000-3
SELECT * FROM view_3_tab3_851
----
60

query I rowsort label-5000-3
SELECT pk FROM tab3 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94))
----
60

statement ok
DROP VIEW view_1_tab3_851

statement ok
DROP VIEW view_2_tab3_851

statement ok
DROP VIEW view_3_tab3_851

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_851') DROP VIEW view_1_tab4_851

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_851

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_851') DROP VIEW view_2_tab4_851

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_851

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_851') DROP VIEW view_3_tab4_851

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_851

statement ok
CREATE VIEW view_1_tab4_851 AS SELECT pk, col0 FROM tab4 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94))

statement ok
CREATE VIEW view_2_tab4_851 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))

statement ok
CREATE VIEW view_3_tab4_851 AS SELECT pk FROM view_1_tab4_851

query II rowsort label-5000-1
SELECT pk, col0 FROM tab4 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94))
----
60
533

query II rowsort label-5000-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))
----
198 values hashing to 3c07e78cc61b7369ad992595f16e476f

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab4_851
----
60
533

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab4_851
----
198 values hashing to 3c07e78cc61b7369ad992595f16e476f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_851 UNION ALL SELECT pk, col0 FROM view_2_tab4_851
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_851 UNION SELECT pk, col0 FROM view_2_tab4_851
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94)) ) AS tab4_851
----
60

query I rowsort label-5000-3
SELECT * FROM view_3_tab4_851
----
60

query I rowsort label-5000-3
SELECT pk FROM tab4 WHERE ((col0 IN (710,284,533,621,126,972) OR ((col3 = 723)) AND col3 IS NULL AND ((col1 < 438.5 AND col1 > 795.30 OR col0 > 601 AND (col3 <= 972)) AND col0 >= 369) AND ((col0 >= 631)) AND col3 >= 961 AND col3 < 450 AND col1 = 591.94))
----
60

statement ok
DROP VIEW view_1_tab4_851

statement ok
DROP VIEW view_2_tab4_851

statement ok
DROP VIEW view_3_tab4_851

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_852') DROP VIEW view_1_tab0_852

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_852

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_852') DROP VIEW view_2_tab0_852

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_852

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_852') DROP VIEW view_3_tab0_852

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_852

statement ok
CREATE VIEW view_1_tab0_852 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 565 OR col4 >= 996.5

statement ok
CREATE VIEW view_2_tab0_852 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 565 OR col4 >= 996.5)

statement ok
CREATE VIEW view_3_tab0_852 AS SELECT pk FROM view_1_tab0_852

query II rowsort label-5100-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 565 OR col4 >= 996.5
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-5100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 565 OR col4 >= 996.5)
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab0_852
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab0_852
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 565 OR col4 >= 996.5 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 565 OR col4 >= 996.5)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_852 UNION ALL SELECT pk, col0 FROM view_2_tab0_852
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 565 OR col4 >= 996.5 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 565 OR col4 >= 996.5)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_852 UNION SELECT pk, col0 FROM view_2_tab0_852
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 565 OR col4 >= 996.5 ) AS tab0_852
----
50 values hashing to 2c82d8fa31c10ede846e0f90a99956ad

query I rowsort label-5100-3
SELECT * FROM view_3_tab0_852
----
50 values hashing to 2c82d8fa31c10ede846e0f90a99956ad

query I rowsort label-5100-3
SELECT pk FROM tab0 WHERE col3 <= 565 OR col4 >= 996.5
----
50 values hashing to 2c82d8fa31c10ede846e0f90a99956ad

statement ok
DROP VIEW view_1_tab0_852

statement ok
DROP VIEW view_2_tab0_852

statement ok
DROP VIEW view_3_tab0_852

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_852') DROP VIEW view_1_tab1_852

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_852

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_852') DROP VIEW view_2_tab1_852

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_852

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_852') DROP VIEW view_3_tab1_852

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_852

statement ok
CREATE VIEW view_1_tab1_852 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 565 OR col4 >= 996.5

statement ok
CREATE VIEW view_2_tab1_852 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 565 OR col4 >= 996.5)

statement ok
CREATE VIEW view_3_tab1_852 AS SELECT pk FROM view_1_tab1_852

query II rowsort label-5100-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 565 OR col4 >= 996.5
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-5100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 565 OR col4 >= 996.5)
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab1_852
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab1_852
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 565 OR col4 >= 996.5 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 565 OR col4 >= 996.5)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_852 UNION ALL SELECT pk, col0 FROM view_2_tab1_852
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 565 OR col4 >= 996.5 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 565 OR col4 >= 996.5)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_852 UNION SELECT pk, col0 FROM view_2_tab1_852
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 565 OR col4 >= 996.5 ) AS tab1_852
----
50 values hashing to 2c82d8fa31c10ede846e0f90a99956ad

query I rowsort label-5100-3
SELECT * FROM view_3_tab1_852
----
50 values hashing to 2c82d8fa31c10ede846e0f90a99956ad

query I rowsort label-5100-3
SELECT pk FROM tab1 WHERE col3 <= 565 OR col4 >= 996.5
----
50 values hashing to 2c82d8fa31c10ede846e0f90a99956ad

statement ok
DROP VIEW view_1_tab1_852

statement ok
DROP VIEW view_2_tab1_852

statement ok
DROP VIEW view_3_tab1_852

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_852') DROP VIEW view_1_tab2_852

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_852

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_852') DROP VIEW view_2_tab2_852

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_852

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_852') DROP VIEW view_3_tab2_852

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_852

statement ok
CREATE VIEW view_1_tab2_852 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 565 OR col4 >= 996.5

statement ok
CREATE VIEW view_2_tab2_852 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 565 OR col4 >= 996.5)

statement ok
CREATE VIEW view_3_tab2_852 AS SELECT pk FROM view_1_tab2_852

query II rowsort label-5100-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 565 OR col4 >= 996.5
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-5100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 565 OR col4 >= 996.5)
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab2_852
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab2_852
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 565 OR col4 >= 996.5 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 565 OR col4 >= 996.5)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_852 UNION ALL SELECT pk, col0 FROM view_2_tab2_852
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 565 OR col4 >= 996.5 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 565 OR col4 >= 996.5)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_852 UNION SELECT pk, col0 FROM view_2_tab2_852
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 565 OR col4 >= 996.5 ) AS tab2_852
----
50 values hashing to 2c82d8fa31c10ede846e0f90a99956ad

query I rowsort label-5100-3
SELECT * FROM view_3_tab2_852
----
50 values hashing to 2c82d8fa31c10ede846e0f90a99956ad

query I rowsort label-5100-3
SELECT pk FROM tab2 WHERE col3 <= 565 OR col4 >= 996.5
----
50 values hashing to 2c82d8fa31c10ede846e0f90a99956ad

statement ok
DROP VIEW view_1_tab2_852

statement ok
DROP VIEW view_2_tab2_852

statement ok
DROP VIEW view_3_tab2_852

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_852') DROP VIEW view_1_tab3_852

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_852

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_852') DROP VIEW view_2_tab3_852

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_852

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_852') DROP VIEW view_3_tab3_852

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_852

statement ok
CREATE VIEW view_1_tab3_852 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 565 OR col4 >= 996.5

statement ok
CREATE VIEW view_2_tab3_852 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 565 OR col4 >= 996.5)

statement ok
CREATE VIEW view_3_tab3_852 AS SELECT pk FROM view_1_tab3_852

query II rowsort label-5100-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 565 OR col4 >= 996.5
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-5100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 565 OR col4 >= 996.5)
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab3_852
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab3_852
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 565 OR col4 >= 996.5 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 565 OR col4 >= 996.5)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_852 UNION ALL SELECT pk, col0 FROM view_2_tab3_852
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 565 OR col4 >= 996.5 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 565 OR col4 >= 996.5)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_852 UNION SELECT pk, col0 FROM view_2_tab3_852
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 565 OR col4 >= 996.5 ) AS tab3_852
----
50 values hashing to 2c82d8fa31c10ede846e0f90a99956ad

query I rowsort label-5100-3
SELECT * FROM view_3_tab3_852
----
50 values hashing to 2c82d8fa31c10ede846e0f90a99956ad

query I rowsort label-5100-3
SELECT pk FROM tab3 WHERE col3 <= 565 OR col4 >= 996.5
----
50 values hashing to 2c82d8fa31c10ede846e0f90a99956ad

statement ok
DROP VIEW view_1_tab3_852

statement ok
DROP VIEW view_2_tab3_852

statement ok
DROP VIEW view_3_tab3_852

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_852') DROP VIEW view_1_tab4_852

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_852

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_852') DROP VIEW view_2_tab4_852

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_852

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_852') DROP VIEW view_3_tab4_852

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_852

statement ok
CREATE VIEW view_1_tab4_852 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 565 OR col4 >= 996.5

statement ok
CREATE VIEW view_2_tab4_852 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 565 OR col4 >= 996.5)

statement ok
CREATE VIEW view_3_tab4_852 AS SELECT pk FROM view_1_tab4_852

query II rowsort label-5100-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 565 OR col4 >= 996.5
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-5100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 565 OR col4 >= 996.5)
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab4_852
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab4_852
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 565 OR col4 >= 996.5 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 565 OR col4 >= 996.5)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_852 UNION ALL SELECT pk, col0 FROM view_2_tab4_852
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 565 OR col4 >= 996.5 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 565 OR col4 >= 996.5)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_852 UNION SELECT pk, col0 FROM view_2_tab4_852
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 565 OR col4 >= 996.5 ) AS tab4_852
----
50 values hashing to 2c82d8fa31c10ede846e0f90a99956ad

query I rowsort label-5100-3
SELECT * FROM view_3_tab4_852
----
50 values hashing to 2c82d8fa31c10ede846e0f90a99956ad

query I rowsort label-5100-3
SELECT pk FROM tab4 WHERE col3 <= 565 OR col4 >= 996.5
----
50 values hashing to 2c82d8fa31c10ede846e0f90a99956ad

statement ok
DROP VIEW view_1_tab4_852

statement ok
DROP VIEW view_2_tab4_852

statement ok
DROP VIEW view_3_tab4_852

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_853') DROP VIEW view_1_tab0_853

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_853

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_853') DROP VIEW view_2_tab0_853

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_853

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_853') DROP VIEW view_3_tab0_853

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_853

statement ok
CREATE VIEW view_1_tab0_853 AS SELECT pk, col0 FROM tab0 WHERE ((col3 >= 580))

statement ok
CREATE VIEW view_2_tab0_853 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 >= 580)))

statement ok
CREATE VIEW view_3_tab0_853 AS SELECT pk FROM view_1_tab0_853

query II rowsort label-5200-1
SELECT pk, col0 FROM tab0 WHERE ((col3 >= 580))
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-5200-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 >= 580)))
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab0_853
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab0_853
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 >= 580)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col3 >= 580)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_853 UNION ALL SELECT pk, col0 FROM view_2_tab0_853
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 >= 580)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col3 >= 580)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_853 UNION SELECT pk, col0 FROM view_2_tab0_853
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 >= 580)) ) AS tab0_853
----
50 values hashing to ccb908553e6c840f768fdcbbe711e2bf

query I rowsort label-5200-3
SELECT * FROM view_3_tab0_853
----
50 values hashing to ccb908553e6c840f768fdcbbe711e2bf

query I rowsort label-5200-3
SELECT pk FROM tab0 WHERE ((col3 >= 580))
----
50 values hashing to ccb908553e6c840f768fdcbbe711e2bf

statement ok
DROP VIEW view_1_tab0_853

statement ok
DROP VIEW view_2_tab0_853

statement ok
DROP VIEW view_3_tab0_853

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_853') DROP VIEW view_1_tab1_853

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_853

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_853') DROP VIEW view_2_tab1_853

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_853

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_853') DROP VIEW view_3_tab1_853

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_853

statement ok
CREATE VIEW view_1_tab1_853 AS SELECT pk, col0 FROM tab1 WHERE ((col3 >= 580))

statement ok
CREATE VIEW view_2_tab1_853 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 >= 580)))

statement ok
CREATE VIEW view_3_tab1_853 AS SELECT pk FROM view_1_tab1_853

query II rowsort label-5200-1
SELECT pk, col0 FROM tab1 WHERE ((col3 >= 580))
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-5200-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 >= 580)))
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab1_853
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab1_853
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 >= 580)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 >= 580)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_853 UNION ALL SELECT pk, col0 FROM view_2_tab1_853
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 >= 580)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 >= 580)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_853 UNION SELECT pk, col0 FROM view_2_tab1_853
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 >= 580)) ) AS tab1_853
----
50 values hashing to ccb908553e6c840f768fdcbbe711e2bf

query I rowsort label-5200-3
SELECT * FROM view_3_tab1_853
----
50 values hashing to ccb908553e6c840f768fdcbbe711e2bf

query I rowsort label-5200-3
SELECT pk FROM tab1 WHERE ((col3 >= 580))
----
50 values hashing to ccb908553e6c840f768fdcbbe711e2bf

statement ok
DROP VIEW view_1_tab1_853

statement ok
DROP VIEW view_2_tab1_853

statement ok
DROP VIEW view_3_tab1_853

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_853') DROP VIEW view_1_tab2_853

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_853

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_853') DROP VIEW view_2_tab2_853

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_853

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_853') DROP VIEW view_3_tab2_853

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_853

statement ok
CREATE VIEW view_1_tab2_853 AS SELECT pk, col0 FROM tab2 WHERE ((col3 >= 580))

statement ok
CREATE VIEW view_2_tab2_853 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 >= 580)))

statement ok
CREATE VIEW view_3_tab2_853 AS SELECT pk FROM view_1_tab2_853

query II rowsort label-5200-1
SELECT pk, col0 FROM tab2 WHERE ((col3 >= 580))
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-5200-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 >= 580)))
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab2_853
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab2_853
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 >= 580)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 >= 580)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_853 UNION ALL SELECT pk, col0 FROM view_2_tab2_853
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 >= 580)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 >= 580)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_853 UNION SELECT pk, col0 FROM view_2_tab2_853
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 >= 580)) ) AS tab2_853
----
50 values hashing to ccb908553e6c840f768fdcbbe711e2bf

query I rowsort label-5200-3
SELECT * FROM view_3_tab2_853
----
50 values hashing to ccb908553e6c840f768fdcbbe711e2bf

query I rowsort label-5200-3
SELECT pk FROM tab2 WHERE ((col3 >= 580))
----
50 values hashing to ccb908553e6c840f768fdcbbe711e2bf

statement ok
DROP VIEW view_1_tab2_853

statement ok
DROP VIEW view_2_tab2_853

statement ok
DROP VIEW view_3_tab2_853

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_853') DROP VIEW view_1_tab3_853

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_853

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_853') DROP VIEW view_2_tab3_853

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_853

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_853') DROP VIEW view_3_tab3_853

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_853

statement ok
CREATE VIEW view_1_tab3_853 AS SELECT pk, col0 FROM tab3 WHERE ((col3 >= 580))

statement ok
CREATE VIEW view_2_tab3_853 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 >= 580)))

statement ok
CREATE VIEW view_3_tab3_853 AS SELECT pk FROM view_1_tab3_853

query II rowsort label-5200-1
SELECT pk, col0 FROM tab3 WHERE ((col3 >= 580))
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-5200-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 >= 580)))
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab3_853
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab3_853
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 >= 580)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 >= 580)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_853 UNION ALL SELECT pk, col0 FROM view_2_tab3_853
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 >= 580)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 >= 580)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_853 UNION SELECT pk, col0 FROM view_2_tab3_853
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 >= 580)) ) AS tab3_853
----
50 values hashing to ccb908553e6c840f768fdcbbe711e2bf

query I rowsort label-5200-3
SELECT * FROM view_3_tab3_853
----
50 values hashing to ccb908553e6c840f768fdcbbe711e2bf

query I rowsort label-5200-3
SELECT pk FROM tab3 WHERE ((col3 >= 580))
----
50 values hashing to ccb908553e6c840f768fdcbbe711e2bf

statement ok
DROP VIEW view_1_tab3_853

statement ok
DROP VIEW view_2_tab3_853

statement ok
DROP VIEW view_3_tab3_853

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_853') DROP VIEW view_1_tab4_853

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_853

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_853') DROP VIEW view_2_tab4_853

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_853

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_853') DROP VIEW view_3_tab4_853

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_853

statement ok
CREATE VIEW view_1_tab4_853 AS SELECT pk, col0 FROM tab4 WHERE ((col3 >= 580))

statement ok
CREATE VIEW view_2_tab4_853 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 >= 580)))

statement ok
CREATE VIEW view_3_tab4_853 AS SELECT pk FROM view_1_tab4_853

query II rowsort label-5200-1
SELECT pk, col0 FROM tab4 WHERE ((col3 >= 580))
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-5200-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 >= 580)))
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab4_853
----
100 values hashing to 424bc22d7dbab0a9c6c4e4dbc6a089b4

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab4_853
----
100 values hashing to 25dca14406c9e2bac984363e5cfc10cc

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 >= 580)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 >= 580)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_853 UNION ALL SELECT pk, col0 FROM view_2_tab4_853
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 >= 580)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 >= 580)))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_853 UNION SELECT pk, col0 FROM view_2_tab4_853
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 >= 580)) ) AS tab4_853
----
50 values hashing to ccb908553e6c840f768fdcbbe711e2bf

query I rowsort label-5200-3
SELECT * FROM view_3_tab4_853
----
50 values hashing to ccb908553e6c840f768fdcbbe711e2bf

query I rowsort label-5200-3
SELECT pk FROM tab4 WHERE ((col3 >= 580))
----
50 values hashing to ccb908553e6c840f768fdcbbe711e2bf

statement ok
DROP VIEW view_1_tab4_853

statement ok
DROP VIEW view_2_tab4_853

statement ok
DROP VIEW view_3_tab4_853

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_854') DROP VIEW view_1_tab0_854

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_854

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_854') DROP VIEW view_2_tab0_854

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_854

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_854') DROP VIEW view_3_tab0_854

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_854

statement ok
CREATE VIEW view_1_tab0_854 AS SELECT pk, col0 FROM tab0 WHERE col3 IN (704,482,213,837)

statement ok
CREATE VIEW view_2_tab0_854 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (704,482,213,837))

statement ok
CREATE VIEW view_3_tab0_854 AS SELECT pk FROM view_1_tab0_854

query II rowsort label-5300-1
SELECT pk, col0 FROM tab0 WHERE col3 IN (704,482,213,837)
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (704,482,213,837))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab0_854
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab0_854
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IN (704,482,213,837) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (704,482,213,837))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_854 UNION ALL SELECT pk, col0 FROM view_2_tab0_854
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IN (704,482,213,837) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (704,482,213,837))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_854 UNION SELECT pk, col0 FROM view_2_tab0_854
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 IN (704,482,213,837) ) AS tab0_854
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab0_854
----

query I rowsort label-5300-3
SELECT pk FROM tab0 WHERE col3 IN (704,482,213,837)
----

statement ok
DROP VIEW view_1_tab0_854

statement ok
DROP VIEW view_2_tab0_854

statement ok
DROP VIEW view_3_tab0_854

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_854') DROP VIEW view_1_tab1_854

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_854

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_854') DROP VIEW view_2_tab1_854

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_854

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_854') DROP VIEW view_3_tab1_854

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_854

statement ok
CREATE VIEW view_1_tab1_854 AS SELECT pk, col0 FROM tab1 WHERE col3 IN (704,482,213,837)

statement ok
CREATE VIEW view_2_tab1_854 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (704,482,213,837))

statement ok
CREATE VIEW view_3_tab1_854 AS SELECT pk FROM view_1_tab1_854

query II rowsort label-5300-1
SELECT pk, col0 FROM tab1 WHERE col3 IN (704,482,213,837)
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (704,482,213,837))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab1_854
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab1_854
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IN (704,482,213,837) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (704,482,213,837))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_854 UNION ALL SELECT pk, col0 FROM view_2_tab1_854
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IN (704,482,213,837) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (704,482,213,837))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_854 UNION SELECT pk, col0 FROM view_2_tab1_854
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 IN (704,482,213,837) ) AS tab1_854
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab1_854
----

query I rowsort label-5300-3
SELECT pk FROM tab1 WHERE col3 IN (704,482,213,837)
----

statement ok
DROP VIEW view_1_tab1_854

statement ok
DROP VIEW view_2_tab1_854

statement ok
DROP VIEW view_3_tab1_854

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_854') DROP VIEW view_1_tab2_854

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_854

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_854') DROP VIEW view_2_tab2_854

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_854

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_854') DROP VIEW view_3_tab2_854

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_854

statement ok
CREATE VIEW view_1_tab2_854 AS SELECT pk, col0 FROM tab2 WHERE col3 IN (704,482,213,837)

statement ok
CREATE VIEW view_2_tab2_854 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (704,482,213,837))

statement ok
CREATE VIEW view_3_tab2_854 AS SELECT pk FROM view_1_tab2_854

query II rowsort label-5300-1
SELECT pk, col0 FROM tab2 WHERE col3 IN (704,482,213,837)
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (704,482,213,837))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab2_854
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab2_854
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IN (704,482,213,837) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (704,482,213,837))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_854 UNION ALL SELECT pk, col0 FROM view_2_tab2_854
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IN (704,482,213,837) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (704,482,213,837))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_854 UNION SELECT pk, col0 FROM view_2_tab2_854
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 IN (704,482,213,837) ) AS tab2_854
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab2_854
----

query I rowsort label-5300-3
SELECT pk FROM tab2 WHERE col3 IN (704,482,213,837)
----

statement ok
DROP VIEW view_1_tab2_854

statement ok
DROP VIEW view_2_tab2_854

statement ok
DROP VIEW view_3_tab2_854

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_854') DROP VIEW view_1_tab3_854

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_854

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_854') DROP VIEW view_2_tab3_854

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_854

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_854') DROP VIEW view_3_tab3_854

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_854

statement ok
CREATE VIEW view_1_tab3_854 AS SELECT pk, col0 FROM tab3 WHERE col3 IN (704,482,213,837)

statement ok
CREATE VIEW view_2_tab3_854 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (704,482,213,837))

statement ok
CREATE VIEW view_3_tab3_854 AS SELECT pk FROM view_1_tab3_854

query II rowsort label-5300-1
SELECT pk, col0 FROM tab3 WHERE col3 IN (704,482,213,837)
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (704,482,213,837))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab3_854
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab3_854
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IN (704,482,213,837) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (704,482,213,837))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_854 UNION ALL SELECT pk, col0 FROM view_2_tab3_854
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IN (704,482,213,837) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (704,482,213,837))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_854 UNION SELECT pk, col0 FROM view_2_tab3_854
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 IN (704,482,213,837) ) AS tab3_854
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab3_854
----

query I rowsort label-5300-3
SELECT pk FROM tab3 WHERE col3 IN (704,482,213,837)
----

statement ok
DROP VIEW view_1_tab3_854

statement ok
DROP VIEW view_2_tab3_854

statement ok
DROP VIEW view_3_tab3_854

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_854') DROP VIEW view_1_tab4_854

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_854

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_854') DROP VIEW view_2_tab4_854

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_854

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_854') DROP VIEW view_3_tab4_854

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_854

statement ok
CREATE VIEW view_1_tab4_854 AS SELECT pk, col0 FROM tab4 WHERE col3 IN (704,482,213,837)

statement ok
CREATE VIEW view_2_tab4_854 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (704,482,213,837))

statement ok
CREATE VIEW view_3_tab4_854 AS SELECT pk FROM view_1_tab4_854

query II rowsort label-5300-1
SELECT pk, col0 FROM tab4 WHERE col3 IN (704,482,213,837)
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (704,482,213,837))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab4_854
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab4_854
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IN (704,482,213,837) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (704,482,213,837))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_854 UNION ALL SELECT pk, col0 FROM view_2_tab4_854
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IN (704,482,213,837) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (704,482,213,837))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_854 UNION SELECT pk, col0 FROM view_2_tab4_854
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 IN (704,482,213,837) ) AS tab4_854
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab4_854
----

query I rowsort label-5300-3
SELECT pk FROM tab4 WHERE col3 IN (704,482,213,837)
----

statement ok
DROP VIEW view_1_tab4_854

statement ok
DROP VIEW view_2_tab4_854

statement ok
DROP VIEW view_3_tab4_854

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_856') DROP VIEW view_1_tab0_856

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_856

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_856') DROP VIEW view_2_tab0_856

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_856

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_856') DROP VIEW view_3_tab0_856

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_856

statement ok
CREATE VIEW view_1_tab0_856 AS SELECT pk, col0 FROM tab0 WHERE col3 > 740

statement ok
CREATE VIEW view_2_tab0_856 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 740)

statement ok
CREATE VIEW view_3_tab0_856 AS SELECT pk FROM view_1_tab0_856

query II rowsort label-5400-1
SELECT pk, col0 FROM tab0 WHERE col3 > 740
----
64 values hashing to d7e5ed61bd742f2598d88ffef56265a2

query II rowsort label-5400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 740)
----
136 values hashing to 6ba5d759495b298d7610c22d9052e806

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab0_856
----
64 values hashing to d7e5ed61bd742f2598d88ffef56265a2

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab0_856
----
136 values hashing to 6ba5d759495b298d7610c22d9052e806

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 740 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 740)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_856 UNION ALL SELECT pk, col0 FROM view_2_tab0_856
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 740 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 740)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_856 UNION SELECT pk, col0 FROM view_2_tab0_856
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 740 ) AS tab0_856
----
32 values hashing to 09b47ccd9e4a24f5772ebdeb5d638066

query I rowsort label-5400-3
SELECT * FROM view_3_tab0_856
----
32 values hashing to 09b47ccd9e4a24f5772ebdeb5d638066

query I rowsort label-5400-3
SELECT pk FROM tab0 WHERE col3 > 740
----
32 values hashing to 09b47ccd9e4a24f5772ebdeb5d638066

statement ok
DROP VIEW view_1_tab0_856

statement ok
DROP VIEW view_2_tab0_856

statement ok
DROP VIEW view_3_tab0_856

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_856') DROP VIEW view_1_tab1_856

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_856

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_856') DROP VIEW view_2_tab1_856

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_856

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_856') DROP VIEW view_3_tab1_856

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_856

statement ok
CREATE VIEW view_1_tab1_856 AS SELECT pk, col0 FROM tab1 WHERE col3 > 740

statement ok
CREATE VIEW view_2_tab1_856 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 740)

statement ok
CREATE VIEW view_3_tab1_856 AS SELECT pk FROM view_1_tab1_856

query II rowsort label-5400-1
SELECT pk, col0 FROM tab1 WHERE col3 > 740
----
64 values hashing to d7e5ed61bd742f2598d88ffef56265a2

query II rowsort label-5400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 740)
----
136 values hashing to 6ba5d759495b298d7610c22d9052e806

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab1_856
----
64 values hashing to d7e5ed61bd742f2598d88ffef56265a2

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab1_856
----
136 values hashing to 6ba5d759495b298d7610c22d9052e806

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 740 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 740)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_856 UNION ALL SELECT pk, col0 FROM view_2_tab1_856
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 740 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 740)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_856 UNION SELECT pk, col0 FROM view_2_tab1_856
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 740 ) AS tab1_856
----
32 values hashing to 09b47ccd9e4a24f5772ebdeb5d638066

query I rowsort label-5400-3
SELECT * FROM view_3_tab1_856
----
32 values hashing to 09b47ccd9e4a24f5772ebdeb5d638066

query I rowsort label-5400-3
SELECT pk FROM tab1 WHERE col3 > 740
----
32 values hashing to 09b47ccd9e4a24f5772ebdeb5d638066

statement ok
DROP VIEW view_1_tab1_856

statement ok
DROP VIEW view_2_tab1_856

statement ok
DROP VIEW view_3_tab1_856

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_856') DROP VIEW view_1_tab2_856

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_856

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_856') DROP VIEW view_2_tab2_856

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_856

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_856') DROP VIEW view_3_tab2_856

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_856

statement ok
CREATE VIEW view_1_tab2_856 AS SELECT pk, col0 FROM tab2 WHERE col3 > 740

statement ok
CREATE VIEW view_2_tab2_856 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 740)

statement ok
CREATE VIEW view_3_tab2_856 AS SELECT pk FROM view_1_tab2_856

query II rowsort label-5400-1
SELECT pk, col0 FROM tab2 WHERE col3 > 740
----
64 values hashing to d7e5ed61bd742f2598d88ffef56265a2

query II rowsort label-5400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 740)
----
136 values hashing to 6ba5d759495b298d7610c22d9052e806

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab2_856
----
64 values hashing to d7e5ed61bd742f2598d88ffef56265a2

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab2_856
----
136 values hashing to 6ba5d759495b298d7610c22d9052e806

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 740 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 740)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_856 UNION ALL SELECT pk, col0 FROM view_2_tab2_856
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 740 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 740)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_856 UNION SELECT pk, col0 FROM view_2_tab2_856
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 740 ) AS tab2_856
----
32 values hashing to 09b47ccd9e4a24f5772ebdeb5d638066

query I rowsort label-5400-3
SELECT * FROM view_3_tab2_856
----
32 values hashing to 09b47ccd9e4a24f5772ebdeb5d638066

query I rowsort label-5400-3
SELECT pk FROM tab2 WHERE col3 > 740
----
32 values hashing to 09b47ccd9e4a24f5772ebdeb5d638066

statement ok
DROP VIEW view_1_tab2_856

statement ok
DROP VIEW view_2_tab2_856

statement ok
DROP VIEW view_3_tab2_856

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_856') DROP VIEW view_1_tab3_856

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_856

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_856') DROP VIEW view_2_tab3_856

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_856

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_856') DROP VIEW view_3_tab3_856

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_856

statement ok
CREATE VIEW view_1_tab3_856 AS SELECT pk, col0 FROM tab3 WHERE col3 > 740

statement ok
CREATE VIEW view_2_tab3_856 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 740)

statement ok
CREATE VIEW view_3_tab3_856 AS SELECT pk FROM view_1_tab3_856

query II rowsort label-5400-1
SELECT pk, col0 FROM tab3 WHERE col3 > 740
----
64 values hashing to d7e5ed61bd742f2598d88ffef56265a2

query II rowsort label-5400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 740)
----
136 values hashing to 6ba5d759495b298d7610c22d9052e806

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab3_856
----
64 values hashing to d7e5ed61bd742f2598d88ffef56265a2

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab3_856
----
136 values hashing to 6ba5d759495b298d7610c22d9052e806

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 740 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 740)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_856 UNION ALL SELECT pk, col0 FROM view_2_tab3_856
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 740 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 740)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_856 UNION SELECT pk, col0 FROM view_2_tab3_856
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 740 ) AS tab3_856
----
32 values hashing to 09b47ccd9e4a24f5772ebdeb5d638066

query I rowsort label-5400-3
SELECT * FROM view_3_tab3_856
----
32 values hashing to 09b47ccd9e4a24f5772ebdeb5d638066

query I rowsort label-5400-3
SELECT pk FROM tab3 WHERE col3 > 740
----
32 values hashing to 09b47ccd9e4a24f5772ebdeb5d638066

statement ok
DROP VIEW view_1_tab3_856

statement ok
DROP VIEW view_2_tab3_856

statement ok
DROP VIEW view_3_tab3_856

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_856') DROP VIEW view_1_tab4_856

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_856

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_856') DROP VIEW view_2_tab4_856

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_856

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_856') DROP VIEW view_3_tab4_856

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_856

statement ok
CREATE VIEW view_1_tab4_856 AS SELECT pk, col0 FROM tab4 WHERE col3 > 740

statement ok
CREATE VIEW view_2_tab4_856 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 740)

statement ok
CREATE VIEW view_3_tab4_856 AS SELECT pk FROM view_1_tab4_856

query II rowsort label-5400-1
SELECT pk, col0 FROM tab4 WHERE col3 > 740
----
64 values hashing to d7e5ed61bd742f2598d88ffef56265a2

query II rowsort label-5400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 740)
----
136 values hashing to 6ba5d759495b298d7610c22d9052e806

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab4_856
----
64 values hashing to d7e5ed61bd742f2598d88ffef56265a2

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab4_856
----
136 values hashing to 6ba5d759495b298d7610c22d9052e806

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 740 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 740)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_856 UNION ALL SELECT pk, col0 FROM view_2_tab4_856
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 740 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 740)
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_856 UNION SELECT pk, col0 FROM view_2_tab4_856
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 740 ) AS tab4_856
----
32 values hashing to 09b47ccd9e4a24f5772ebdeb5d638066

query I rowsort label-5400-3
SELECT * FROM view_3_tab4_856
----
32 values hashing to 09b47ccd9e4a24f5772ebdeb5d638066

query I rowsort label-5400-3
SELECT pk FROM tab4 WHERE col3 > 740
----
32 values hashing to 09b47ccd9e4a24f5772ebdeb5d638066

statement ok
DROP VIEW view_1_tab4_856

statement ok
DROP VIEW view_2_tab4_856

statement ok
DROP VIEW view_3_tab4_856

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_857') DROP VIEW view_1_tab0_857

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_857

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_857') DROP VIEW view_2_tab0_857

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_857

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_857') DROP VIEW view_3_tab0_857

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_857

statement ok
CREATE VIEW view_1_tab0_857 AS SELECT pk, col0 FROM tab0 WHERE (col3 = 847)

statement ok
CREATE VIEW view_2_tab0_857 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 847))

statement ok
CREATE VIEW view_3_tab0_857 AS SELECT pk FROM view_1_tab0_857

query II rowsort label-5500-1
SELECT pk, col0 FROM tab0 WHERE (col3 = 847)
----
14
818

query II rowsort label-5500-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 847))
----
198 values hashing to 03f9dc7de68dbe2c6e2c8011bb4eb88c

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab0_857
----
14
818

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab0_857
----
198 values hashing to 03f9dc7de68dbe2c6e2c8011bb4eb88c

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 = 847) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 847))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_857 UNION ALL SELECT pk, col0 FROM view_2_tab0_857
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 = 847) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 847))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_857 UNION SELECT pk, col0 FROM view_2_tab0_857
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 = 847) ) AS tab0_857
----
14

query I rowsort label-5500-3
SELECT * FROM view_3_tab0_857
----
14

query I rowsort label-5500-3
SELECT pk FROM tab0 WHERE (col3 = 847)
----
14

statement ok
DROP VIEW view_1_tab0_857

statement ok
DROP VIEW view_2_tab0_857

statement ok
DROP VIEW view_3_tab0_857

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_857') DROP VIEW view_1_tab1_857

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_857

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_857') DROP VIEW view_2_tab1_857

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_857

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_857') DROP VIEW view_3_tab1_857

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_857

statement ok
CREATE VIEW view_1_tab1_857 AS SELECT pk, col0 FROM tab1 WHERE (col3 = 847)

statement ok
CREATE VIEW view_2_tab1_857 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 847))

statement ok
CREATE VIEW view_3_tab1_857 AS SELECT pk FROM view_1_tab1_857

query II rowsort label-5500-1
SELECT pk, col0 FROM tab1 WHERE (col3 = 847)
----
14
818

query II rowsort label-5500-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 847))
----
198 values hashing to 03f9dc7de68dbe2c6e2c8011bb4eb88c

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab1_857
----
14
818

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab1_857
----
198 values hashing to 03f9dc7de68dbe2c6e2c8011bb4eb88c

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 = 847) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 847))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_857 UNION ALL SELECT pk, col0 FROM view_2_tab1_857
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 = 847) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 847))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_857 UNION SELECT pk, col0 FROM view_2_tab1_857
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 = 847) ) AS tab1_857
----
14

query I rowsort label-5500-3
SELECT * FROM view_3_tab1_857
----
14

query I rowsort label-5500-3
SELECT pk FROM tab1 WHERE (col3 = 847)
----
14

statement ok
DROP VIEW view_1_tab1_857

statement ok
DROP VIEW view_2_tab1_857

statement ok
DROP VIEW view_3_tab1_857

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_857') DROP VIEW view_1_tab2_857

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_857

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_857') DROP VIEW view_2_tab2_857

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_857

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_857') DROP VIEW view_3_tab2_857

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_857

statement ok
CREATE VIEW view_1_tab2_857 AS SELECT pk, col0 FROM tab2 WHERE (col3 = 847)

statement ok
CREATE VIEW view_2_tab2_857 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 847))

statement ok
CREATE VIEW view_3_tab2_857 AS SELECT pk FROM view_1_tab2_857

query II rowsort label-5500-1
SELECT pk, col0 FROM tab2 WHERE (col3 = 847)
----
14
818

query II rowsort label-5500-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 847))
----
198 values hashing to 03f9dc7de68dbe2c6e2c8011bb4eb88c

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab2_857
----
14
818

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab2_857
----
198 values hashing to 03f9dc7de68dbe2c6e2c8011bb4eb88c

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 = 847) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 847))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_857 UNION ALL SELECT pk, col0 FROM view_2_tab2_857
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 = 847) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 847))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_857 UNION SELECT pk, col0 FROM view_2_tab2_857
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 = 847) ) AS tab2_857
----
14

query I rowsort label-5500-3
SELECT * FROM view_3_tab2_857
----
14

query I rowsort label-5500-3
SELECT pk FROM tab2 WHERE (col3 = 847)
----
14

statement ok
DROP VIEW view_1_tab2_857

statement ok
DROP VIEW view_2_tab2_857

statement ok
DROP VIEW view_3_tab2_857

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_857') DROP VIEW view_1_tab3_857

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_857

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_857') DROP VIEW view_2_tab3_857

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_857

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_857') DROP VIEW view_3_tab3_857

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_857

statement ok
CREATE VIEW view_1_tab3_857 AS SELECT pk, col0 FROM tab3 WHERE (col3 = 847)

statement ok
CREATE VIEW view_2_tab3_857 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 847))

statement ok
CREATE VIEW view_3_tab3_857 AS SELECT pk FROM view_1_tab3_857

query II rowsort label-5500-1
SELECT pk, col0 FROM tab3 WHERE (col3 = 847)
----
14
818

query II rowsort label-5500-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 847))
----
198 values hashing to 03f9dc7de68dbe2c6e2c8011bb4eb88c

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab3_857
----
14
818

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab3_857
----
198 values hashing to 03f9dc7de68dbe2c6e2c8011bb4eb88c

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 = 847) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 847))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_857 UNION ALL SELECT pk, col0 FROM view_2_tab3_857
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 = 847) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 847))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_857 UNION SELECT pk, col0 FROM view_2_tab3_857
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 = 847) ) AS tab3_857
----
14

query I rowsort label-5500-3
SELECT * FROM view_3_tab3_857
----
14

query I rowsort label-5500-3
SELECT pk FROM tab3 WHERE (col3 = 847)
----
14

statement ok
DROP VIEW view_1_tab3_857

statement ok
DROP VIEW view_2_tab3_857

statement ok
DROP VIEW view_3_tab3_857

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_857') DROP VIEW view_1_tab4_857

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_857

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_857') DROP VIEW view_2_tab4_857

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_857

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_857') DROP VIEW view_3_tab4_857

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_857

statement ok
CREATE VIEW view_1_tab4_857 AS SELECT pk, col0 FROM tab4 WHERE (col3 = 847)

statement ok
CREATE VIEW view_2_tab4_857 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 847))

statement ok
CREATE VIEW view_3_tab4_857 AS SELECT pk FROM view_1_tab4_857

query II rowsort label-5500-1
SELECT pk, col0 FROM tab4 WHERE (col3 = 847)
----
14
818

query II rowsort label-5500-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 847))
----
198 values hashing to 03f9dc7de68dbe2c6e2c8011bb4eb88c

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab4_857
----
14
818

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab4_857
----
198 values hashing to 03f9dc7de68dbe2c6e2c8011bb4eb88c

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 = 847) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 847))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_857 UNION ALL SELECT pk, col0 FROM view_2_tab4_857
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 = 847) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 847))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_857 UNION SELECT pk, col0 FROM view_2_tab4_857
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 = 847) ) AS tab4_857
----
14

query I rowsort label-5500-3
SELECT * FROM view_3_tab4_857
----
14

query I rowsort label-5500-3
SELECT pk FROM tab4 WHERE (col3 = 847)
----
14

statement ok
DROP VIEW view_1_tab4_857

statement ok
DROP VIEW view_2_tab4_857

statement ok
DROP VIEW view_3_tab4_857

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_858') DROP VIEW view_1_tab0_858

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_858

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_858') DROP VIEW view_2_tab0_858

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_858

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_858') DROP VIEW view_3_tab0_858

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_858

statement ok
CREATE VIEW view_1_tab0_858 AS SELECT pk, col0 FROM tab0 WHERE (col4 < 865.42)

statement ok
CREATE VIEW view_2_tab0_858 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col4 < 865.42))

statement ok
CREATE VIEW view_3_tab0_858 AS SELECT pk FROM view_1_tab0_858

query II rowsort label-5600-1
SELECT pk, col0 FROM tab0 WHERE (col4 < 865.42)
----
172 values hashing to 8e76538c6c05992d4aef9d3e35455c6a

query II rowsort label-5600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col4 < 865.42))
----
28 values hashing to 8b6fb07f8ce4a2b80856386d061746fe

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab0_858
----
172 values hashing to 8e76538c6c05992d4aef9d3e35455c6a

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab0_858
----
28 values hashing to 8b6fb07f8ce4a2b80856386d061746fe

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 < 865.42) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col4 < 865.42))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_858 UNION ALL SELECT pk, col0 FROM view_2_tab0_858
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 < 865.42) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col4 < 865.42))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_858 UNION SELECT pk, col0 FROM view_2_tab0_858
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col4 < 865.42) ) AS tab0_858
----
86 values hashing to 036457a5d35b29289ab022a1e75b261a

query I rowsort label-5600-3
SELECT * FROM view_3_tab0_858
----
86 values hashing to 036457a5d35b29289ab022a1e75b261a

query I rowsort label-5600-3
SELECT pk FROM tab0 WHERE (col4 < 865.42)
----
86 values hashing to 036457a5d35b29289ab022a1e75b261a

statement ok
DROP VIEW view_1_tab0_858

statement ok
DROP VIEW view_2_tab0_858

statement ok
DROP VIEW view_3_tab0_858

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_858') DROP VIEW view_1_tab1_858

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_858

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_858') DROP VIEW view_2_tab1_858

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_858

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_858') DROP VIEW view_3_tab1_858

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_858

statement ok
CREATE VIEW view_1_tab1_858 AS SELECT pk, col0 FROM tab1 WHERE (col4 < 865.42)

statement ok
CREATE VIEW view_2_tab1_858 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col4 < 865.42))

statement ok
CREATE VIEW view_3_tab1_858 AS SELECT pk FROM view_1_tab1_858

query II rowsort label-5600-1
SELECT pk, col0 FROM tab1 WHERE (col4 < 865.42)
----
172 values hashing to 8e76538c6c05992d4aef9d3e35455c6a

query II rowsort label-5600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col4 < 865.42))
----
28 values hashing to 8b6fb07f8ce4a2b80856386d061746fe

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab1_858
----
172 values hashing to 8e76538c6c05992d4aef9d3e35455c6a

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab1_858
----
28 values hashing to 8b6fb07f8ce4a2b80856386d061746fe

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 < 865.42) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col4 < 865.42))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_858 UNION ALL SELECT pk, col0 FROM view_2_tab1_858
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 < 865.42) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col4 < 865.42))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_858 UNION SELECT pk, col0 FROM view_2_tab1_858
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col4 < 865.42) ) AS tab1_858
----
86 values hashing to 036457a5d35b29289ab022a1e75b261a

query I rowsort label-5600-3
SELECT * FROM view_3_tab1_858
----
86 values hashing to 036457a5d35b29289ab022a1e75b261a

query I rowsort label-5600-3
SELECT pk FROM tab1 WHERE (col4 < 865.42)
----
86 values hashing to 036457a5d35b29289ab022a1e75b261a

statement ok
DROP VIEW view_1_tab1_858

statement ok
DROP VIEW view_2_tab1_858

statement ok
DROP VIEW view_3_tab1_858

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_858') DROP VIEW view_1_tab2_858

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_858

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_858') DROP VIEW view_2_tab2_858

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_858

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_858') DROP VIEW view_3_tab2_858

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_858

statement ok
CREATE VIEW view_1_tab2_858 AS SELECT pk, col0 FROM tab2 WHERE (col4 < 865.42)

statement ok
CREATE VIEW view_2_tab2_858 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col4 < 865.42))

statement ok
CREATE VIEW view_3_tab2_858 AS SELECT pk FROM view_1_tab2_858

query II rowsort label-5600-1
SELECT pk, col0 FROM tab2 WHERE (col4 < 865.42)
----
172 values hashing to 8e76538c6c05992d4aef9d3e35455c6a

query II rowsort label-5600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col4 < 865.42))
----
28 values hashing to 8b6fb07f8ce4a2b80856386d061746fe

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab2_858
----
172 values hashing to 8e76538c6c05992d4aef9d3e35455c6a

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab2_858
----
28 values hashing to 8b6fb07f8ce4a2b80856386d061746fe

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 < 865.42) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col4 < 865.42))
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_858 UNION ALL SELECT pk, col0 FROM view_2_tab2_858
----
200 values hashing to 1f802b0a3b44f9cabe25342f52910891

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 < 865.42) UNION SELECT pk, col0 FROM tab2 WH