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,861,590.22,'bfwea',759,652.82,'tafya')

statement ok
INSERT INTO tab0 VALUES(1,831,287.53,'ggqnw',407,529.20,'elcir')

statement ok
INSERT INTO tab0 VALUES(2,728,797.13,'xnnoe',185,187.23,'edwuz')

statement ok
INSERT INTO tab0 VALUES(3,684,375.28,'czuav',133,159.34,'hnfmu')

statement ok
INSERT INTO tab0 VALUES(4,54,613.25,'znbrb',325,878.27,'ivxuh')

statement ok
INSERT INTO tab0 VALUES(5,40,566.89,'wljuo',495,802.67,'elrae')

statement ok
INSERT INTO tab0 VALUES(6,310,877.31,'jglsp',658,540.75,'cvnut')

statement ok
INSERT INTO tab0 VALUES(7,634,903.47,'meupd',738,977.88,'yxqyd')

statement ok
INSERT INTO tab0 VALUES(8,497,837.83,'twsaw',193,398.25,'awswj')

statement ok
INSERT INTO tab0 VALUES(9,733,835.94,'lwnmq',636,612.45,'mrbkj')

statement ok
INSERT INTO tab0 VALUES(10,146,143.10,'nkrgd',468,80.13,'gsnjg')

statement ok
INSERT INTO tab0 VALUES(11,136,218.97,'ybwtk',496,37.62,'gmvam')

statement ok
INSERT INTO tab0 VALUES(12,322,856.19,'rddjs',557,621.54,'pdsyu')

statement ok
INSERT INTO tab0 VALUES(13,171,314.3,'xnazx',152,992.43,'lewml')

statement ok
INSERT INTO tab0 VALUES(14,620,440.96,'yetqg',62,463.40,'nzdnk')

statement ok
INSERT INTO tab0 VALUES(15,700,792.35,'txdbu',976,622.70,'vouxh')

statement ok
INSERT INTO tab0 VALUES(16,165,767.4,'rtbnj',117,454.41,'dclir')

statement ok
INSERT INTO tab0 VALUES(17,114,725.98,'tygdv',866,475.2,'woiqe')

statement ok
INSERT INTO tab0 VALUES(18,616,114.86,'vepvz',387,848.7,'hjgvl')

statement ok
INSERT INTO tab0 VALUES(19,337,594.72,'qlgry',253,512.77,'rayil')

statement ok
INSERT INTO tab0 VALUES(20,161,165.60,'brtrc',69,306.64,'kszup')

statement ok
INSERT INTO tab0 VALUES(21,822,288.15,'zfbig',99,95.11,'aycvr')

statement ok
INSERT INTO tab0 VALUES(22,520,10.25,'rpujw',890,894.17,'ncdig')

statement ok
INSERT INTO tab0 VALUES(23,555,97.64,'wbiea',897,994.98,'jgejm')

statement ok
INSERT INTO tab0 VALUES(24,945,146.56,'rgypq',110,85.50,'mnxsp')

statement ok
INSERT INTO tab0 VALUES(25,55,722.36,'bwulq',674,385.10,'sxlls')

statement ok
INSERT INTO tab0 VALUES(26,217,475.9,'rchfx',519,759.23,'rxppd')

statement ok
INSERT INTO tab0 VALUES(27,365,270.22,'cmzsq',983,849.98,'xaavi')

statement ok
INSERT INTO tab0 VALUES(28,650,306.16,'ymwni',438,200.77,'dkgwi')

statement ok
INSERT INTO tab0 VALUES(29,69,251.95,'axkvv',913,377.90,'hpzmm')

statement ok
INSERT INTO tab0 VALUES(30,90,354.87,'lvqxq',720,100.28,'pazsy')

statement ok
INSERT INTO tab0 VALUES(31,277,583.4,'qbjwz',81,362.93,'xtiul')

statement ok
INSERT INTO tab0 VALUES(32,913,741.10,'sriev',750,558.72,'mxpou')

statement ok
INSERT INTO tab0 VALUES(33,629,593.77,'ixfie',638,606.91,'lpyir')

statement ok
INSERT INTO tab0 VALUES(34,26,993.52,'anukb',442,76.83,'uebez')

statement ok
INSERT INTO tab0 VALUES(35,299,9.19,'fncvq',264,315.47,'jgpzu')

statement ok
INSERT INTO tab0 VALUES(36,867,46.59,'hvown',243,567.13,'faapq')

statement ok
INSERT INTO tab0 VALUES(37,992,970.14,'zxcjr',172,104.2,'pzzxn')

statement ok
INSERT INTO tab0 VALUES(38,407,238.52,'cggfr',130,346.92,'cpecc')

statement ok
INSERT INTO tab0 VALUES(39,943,18.25,'aehdu',105,991.76,'vysou')

statement ok
INSERT INTO tab0 VALUES(40,148,316.34,'piihc',614,136.28,'mebhx')

statement ok
INSERT INTO tab0 VALUES(41,918,102.92,'klmtq',337,404.64,'ljirs')

statement ok
INSERT INTO tab0 VALUES(42,121,433.84,'ttbin',734,67.7,'aaeaq')

statement ok
INSERT INTO tab0 VALUES(43,218,579.32,'vvozb',675,174.43,'kpegl')

statement ok
INSERT INTO tab0 VALUES(44,890,148.58,'zcvsw',61,674.93,'zjvle')

statement ok
INSERT INTO tab0 VALUES(45,668,211.43,'qnfxz',455,541.67,'jxqok')

statement ok
INSERT INTO tab0 VALUES(46,550,426.92,'odsfd',699,898.30,'kqhzk')

statement ok
INSERT INTO tab0 VALUES(47,632,166.98,'wtbyp',546,147.66,'pqwee')

statement ok
INSERT INTO tab0 VALUES(48,729,638.1,'howvo',282,88.37,'xcvin')

statement ok
INSERT INTO tab0 VALUES(49,0,16.51,'etqrd',349,45.50,'cdczj')

statement ok
INSERT INTO tab0 VALUES(50,580,561.75,'rdfxm',974,997.14,'tflnt')

statement ok
INSERT INTO tab0 VALUES(51,196,745.32,'xukdb',792,693.7,'lwhby')

statement ok
INSERT INTO tab0 VALUES(52,797,380.84,'xqqym',472,786.37,'xidvo')

statement ok
INSERT INTO tab0 VALUES(53,175,739.51,'zdsly',340,953.4,'yflwu')

statement ok
INSERT INTO tab0 VALUES(54,596,684.77,'swawd',5,21.62,'yyvtm')

statement ok
INSERT INTO tab0 VALUES(55,421,791.93,'cdten',985,96.84,'nqice')

statement ok
INSERT INTO tab0 VALUES(56,731,471.79,'qszuj',330,677.21,'dniei')

statement ok
INSERT INTO tab0 VALUES(57,952,100.25,'ofscu',251,795.69,'trurk')

statement ok
INSERT INTO tab0 VALUES(58,483,142.95,'uaddc',739,130.26,'kpjfy')

statement ok
INSERT INTO tab0 VALUES(59,316,273.90,'grrfs',196,137.60,'xvlxx')

statement ok
INSERT INTO tab0 VALUES(60,665,506.7,'xsbom',53,168.66,'hrmfl')

statement ok
INSERT INTO tab0 VALUES(61,592,320.8,'wapyp',405,607.35,'urxii')

statement ok
INSERT INTO tab0 VALUES(62,624,779.76,'msddw',625,982.9,'bjhxz')

statement ok
INSERT INTO tab0 VALUES(63,390,661.81,'privt',997,101.50,'bvptn')

statement ok
INSERT INTO tab0 VALUES(64,235,582.40,'obsbq',338,169.0,'ohegy')

statement ok
INSERT INTO tab0 VALUES(65,853,120.84,'kcswt',623,919.41,'wvygj')

statement ok
INSERT INTO tab0 VALUES(66,906,942.16,'xrzyl',609,734.63,'iamlx')

statement ok
INSERT INTO tab0 VALUES(67,653,927.75,'vwjfg',462,770.20,'ckefz')

statement ok
INSERT INTO tab0 VALUES(68,575,293.98,'yrcnb',383,87.0,'ohlbm')

statement ok
INSERT INTO tab0 VALUES(69,996,720.86,'enxhd',228,767.79,'hfojr')

statement ok
INSERT INTO tab0 VALUES(70,712,476.61,'sbdzk',138,46.91,'dtfxn')

statement ok
INSERT INTO tab0 VALUES(71,617,541.31,'gqwwk',163,429.85,'ozepu')

statement ok
INSERT INTO tab0 VALUES(72,319,736.54,'yybrn',884,831.93,'nevab')

statement ok
INSERT INTO tab0 VALUES(73,780,841.98,'qupae',42,683.87,'ulacy')

statement ok
INSERT INTO tab0 VALUES(74,928,726.7,'zmrhs',160,73.44,'yihue')

statement ok
INSERT INTO tab0 VALUES(75,287,474.57,'nrmau',171,861.10,'mjzmv')

statement ok
INSERT INTO tab0 VALUES(76,602,507.27,'wvtti',39,808.58,'dylwh')

statement ok
INSERT INTO tab0 VALUES(77,466,703.54,'uzrms',388,701.57,'tpylk')

statement ok
INSERT INTO tab0 VALUES(78,938,539.0,'ieaix',122,476.27,'pxbet')

statement ok
INSERT INTO tab0 VALUES(79,177,197.14,'yjigp',59,348.9,'kzpcq')

statement ok
INSERT INTO tab0 VALUES(80,60,698.90,'qtanf',545,927.22,'nbvxf')

statement ok
INSERT INTO tab0 VALUES(81,812,29.38,'dpmme',86,353.27,'yiott')

statement ok
INSERT INTO tab0 VALUES(82,627,261.38,'vugda',971,413.91,'phipn')

statement ok
INSERT INTO tab0 VALUES(83,295,680.8,'elbql',899,673.48,'lpkcc')

statement ok
INSERT INTO tab0 VALUES(84,827,910.64,'pobfl',599,596.62,'jnbam')

statement ok
INSERT INTO tab0 VALUES(85,79,37.83,'qrxll',461,672.89,'qrozf')

statement ok
INSERT INTO tab0 VALUES(86,380,737.66,'eludo',155,542.39,'wrkeh')

statement ok
INSERT INTO tab0 VALUES(87,151,394.0,'oftwm',265,120.42,'bpjrs')

statement ok
INSERT INTO tab0 VALUES(88,537,235.20,'otqou',900,723.6,'wtrke')

statement ok
INSERT INTO tab0 VALUES(89,27,449.73,'tvhfy',333,193.82,'rhcpl')

statement ok
INSERT INTO tab0 VALUES(90,81,311.80,'kvsko',621,20.24,'tuckm')

statement ok
INSERT INTO tab0 VALUES(91,755,309.97,'slcaj',225,473.56,'ivxnk')

statement ok
INSERT INTO tab0 VALUES(92,326,271.79,'zeawn',642,717.32,'rutzu')

statement ok
INSERT INTO tab0 VALUES(93,915,486.43,'oapen',27,948.95,'igwns')

statement ok
INSERT INTO tab0 VALUES(94,116,831.28,'eemkm',816,507.47,'gwsjv')

statement ok
INSERT INTO tab0 VALUES(95,618,897.60,'zmetf',356,13.5,'urzvq')

statement ok
INSERT INTO tab0 VALUES(96,828,112.13,'qhyuk',525,486.66,'ycwzm')

statement ok
INSERT INTO tab0 VALUES(97,503,868.75,'lvceo',362,470.70,'kfcdr')

statement ok
INSERT INTO tab0 VALUES(98,369,643.4,'pbccj',687,160.62,'tqcps')

statement ok
INSERT INTO tab0 VALUES(99,746,128.95,'bbpds',727,525.54,'ozbgj')

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

statement ok
CREATE INDEX idx_tab1_0 on tab1 (col0)

statement ok
CREATE INDEX idx_tab1_1 on tab1 (col1)

statement ok
CREATE INDEX idx_tab1_3 on tab1 (col3)

statement ok
CREATE INDEX idx_tab1_4 on tab1 (col4)

statement ok
INSERT INTO tab1 SELECT * FROM tab0

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

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

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

statement ok
CREATE INDEX idx_tab2_4 ON tab2 (col0,col4 DESC,col1)

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

statement ok
CREATE INDEX idx_tab3_1 ON tab3 (col4 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 (col0 DESC)

statement ok
CREATE UNIQUE INDEX idx_tab4_1 ON tab4 (col4)

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 ee9d23c216f4de232614e0a99cb5b461

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_597 AS SELECT pk, col0 FROM tab0 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331)

statement ok
CREATE VIEW view_2_tab0_597 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))

statement ok
CREATE VIEW view_3_tab0_597 AS SELECT pk FROM view_1_tab0_597

query II rowsort label-0-1
SELECT pk, col0 FROM tab0 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331)
----
69
996

query II rowsort label-0-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))
----
198 values hashing to 2137860871ae4fe79c4b80c4c4fbbe9f

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab0_597
----
69
996

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab0_597
----
198 values hashing to 2137860871ae4fe79c4b80c4c4fbbe9f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_597 UNION ALL SELECT pk, col0 FROM view_2_tab0_597
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_597 UNION SELECT pk, col0 FROM view_2_tab0_597
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331) ) AS tab0_597
----
69

query I rowsort label-0-3
SELECT * FROM view_3_tab0_597
----
69

query I rowsort label-0-3
SELECT pk FROM tab0 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331)
----
69

statement ok
DROP VIEW view_1_tab0_597

statement ok
DROP VIEW view_2_tab0_597

statement ok
DROP VIEW view_3_tab0_597

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_597 AS SELECT pk, col0 FROM tab1 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331)

statement ok
CREATE VIEW view_2_tab1_597 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))

statement ok
CREATE VIEW view_3_tab1_597 AS SELECT pk FROM view_1_tab1_597

query II rowsort label-0-1
SELECT pk, col0 FROM tab1 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331)
----
69
996

query II rowsort label-0-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))
----
198 values hashing to 2137860871ae4fe79c4b80c4c4fbbe9f

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab1_597
----
69
996

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab1_597
----
198 values hashing to 2137860871ae4fe79c4b80c4c4fbbe9f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_597 UNION ALL SELECT pk, col0 FROM view_2_tab1_597
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_597 UNION SELECT pk, col0 FROM view_2_tab1_597
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331) ) AS tab1_597
----
69

query I rowsort label-0-3
SELECT * FROM view_3_tab1_597
----
69

query I rowsort label-0-3
SELECT pk FROM tab1 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331)
----
69

statement ok
DROP VIEW view_1_tab1_597

statement ok
DROP VIEW view_2_tab1_597

statement ok
DROP VIEW view_3_tab1_597

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_597 AS SELECT pk, col0 FROM tab2 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331)

statement ok
CREATE VIEW view_2_tab2_597 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))

statement ok
CREATE VIEW view_3_tab2_597 AS SELECT pk FROM view_1_tab2_597

query II rowsort label-0-1
SELECT pk, col0 FROM tab2 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331)
----
69
996

query II rowsort label-0-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))
----
198 values hashing to 2137860871ae4fe79c4b80c4c4fbbe9f

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab2_597
----
69
996

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab2_597
----
198 values hashing to 2137860871ae4fe79c4b80c4c4fbbe9f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_597 UNION ALL SELECT pk, col0 FROM view_2_tab2_597
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_597 UNION SELECT pk, col0 FROM view_2_tab2_597
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331) ) AS tab2_597
----
69

query I rowsort label-0-3
SELECT * FROM view_3_tab2_597
----
69

query I rowsort label-0-3
SELECT pk FROM tab2 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331)
----
69

statement ok
DROP VIEW view_1_tab2_597

statement ok
DROP VIEW view_2_tab2_597

statement ok
DROP VIEW view_3_tab2_597

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_597 AS SELECT pk, col0 FROM tab3 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331)

statement ok
CREATE VIEW view_2_tab3_597 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))

statement ok
CREATE VIEW view_3_tab3_597 AS SELECT pk FROM view_1_tab3_597

query II rowsort label-0-1
SELECT pk, col0 FROM tab3 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331)
----
69
996

query II rowsort label-0-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))
----
198 values hashing to 2137860871ae4fe79c4b80c4c4fbbe9f

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab3_597
----
69
996

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab3_597
----
198 values hashing to 2137860871ae4fe79c4b80c4c4fbbe9f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_597 UNION ALL SELECT pk, col0 FROM view_2_tab3_597
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_597 UNION SELECT pk, col0 FROM view_2_tab3_597
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331) ) AS tab3_597
----
69

query I rowsort label-0-3
SELECT * FROM view_3_tab3_597
----
69

query I rowsort label-0-3
SELECT pk FROM tab3 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331)
----
69

statement ok
DROP VIEW view_1_tab3_597

statement ok
DROP VIEW view_2_tab3_597

statement ok
DROP VIEW view_3_tab3_597

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_597 AS SELECT pk, col0 FROM tab4 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331)

statement ok
CREATE VIEW view_2_tab4_597 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))

statement ok
CREATE VIEW view_3_tab4_597 AS SELECT pk FROM view_1_tab4_597

query II rowsort label-0-1
SELECT pk, col0 FROM tab4 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331)
----
69
996

query II rowsort label-0-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))
----
198 values hashing to 2137860871ae4fe79c4b80c4c4fbbe9f

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab4_597
----
69
996

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab4_597
----
198 values hashing to 2137860871ae4fe79c4b80c4c4fbbe9f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_597 UNION ALL SELECT pk, col0 FROM view_2_tab4_597
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_597 UNION SELECT pk, col0 FROM view_2_tab4_597
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331) ) AS tab4_597
----
69

query I rowsort label-0-3
SELECT * FROM view_3_tab4_597
----
69

query I rowsort label-0-3
SELECT pk FROM tab4 WHERE ((col1 >= 565.79)) AND col0 > 948 AND (col4 > 207.27 OR col3 = 331)
----
69

statement ok
DROP VIEW view_1_tab4_597

statement ok
DROP VIEW view_2_tab4_597

statement ok
DROP VIEW view_3_tab4_597

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_598 AS SELECT pk, col0 FROM tab0 WHERE (col0 > 367)

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

statement ok
CREATE VIEW view_3_tab0_598 AS SELECT pk FROM view_1_tab0_598

query II rowsort label-100-1
SELECT pk, col0 FROM tab0 WHERE (col0 > 367)
----
124 values hashing to c3125a3b14fb04b57cd334eea33b5fad

query II rowsort label-100-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 367))
----
76 values hashing to 48147d22c6fc43e4a29f4cf149e71109

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab0_598
----
124 values hashing to c3125a3b14fb04b57cd334eea33b5fad

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab0_598
----
76 values hashing to 48147d22c6fc43e4a29f4cf149e71109

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_598 UNION ALL SELECT pk, col0 FROM view_2_tab0_598
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_598 UNION SELECT pk, col0 FROM view_2_tab0_598
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 > 367) ) AS tab0_598
----
62 values hashing to 7129d36681b60af938fc89dba8fec07b

query I rowsort label-100-3
SELECT * FROM view_3_tab0_598
----
62 values hashing to 7129d36681b60af938fc89dba8fec07b

query I rowsort label-100-3
SELECT pk FROM tab0 WHERE (col0 > 367)
----
62 values hashing to 7129d36681b60af938fc89dba8fec07b

statement ok
DROP VIEW view_1_tab0_598

statement ok
DROP VIEW view_2_tab0_598

statement ok
DROP VIEW view_3_tab0_598

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_598 AS SELECT pk, col0 FROM tab1 WHERE (col0 > 367)

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

statement ok
CREATE VIEW view_3_tab1_598 AS SELECT pk FROM view_1_tab1_598

query II rowsort label-100-1
SELECT pk, col0 FROM tab1 WHERE (col0 > 367)
----
124 values hashing to c3125a3b14fb04b57cd334eea33b5fad

query II rowsort label-100-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 367))
----
76 values hashing to 48147d22c6fc43e4a29f4cf149e71109

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab1_598
----
124 values hashing to c3125a3b14fb04b57cd334eea33b5fad

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab1_598
----
76 values hashing to 48147d22c6fc43e4a29f4cf149e71109

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_598 UNION ALL SELECT pk, col0 FROM view_2_tab1_598
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_598 UNION SELECT pk, col0 FROM view_2_tab1_598
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 > 367) ) AS tab1_598
----
62 values hashing to 7129d36681b60af938fc89dba8fec07b

query I rowsort label-100-3
SELECT * FROM view_3_tab1_598
----
62 values hashing to 7129d36681b60af938fc89dba8fec07b

query I rowsort label-100-3
SELECT pk FROM tab1 WHERE (col0 > 367)
----
62 values hashing to 7129d36681b60af938fc89dba8fec07b

statement ok
DROP VIEW view_1_tab1_598

statement ok
DROP VIEW view_2_tab1_598

statement ok
DROP VIEW view_3_tab1_598

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_598 AS SELECT pk, col0 FROM tab2 WHERE (col0 > 367)

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

statement ok
CREATE VIEW view_3_tab2_598 AS SELECT pk FROM view_1_tab2_598

query II rowsort label-100-1
SELECT pk, col0 FROM tab2 WHERE (col0 > 367)
----
124 values hashing to c3125a3b14fb04b57cd334eea33b5fad

query II rowsort label-100-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 367))
----
76 values hashing to 48147d22c6fc43e4a29f4cf149e71109

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab2_598
----
124 values hashing to c3125a3b14fb04b57cd334eea33b5fad

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab2_598
----
76 values hashing to 48147d22c6fc43e4a29f4cf149e71109

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_598 UNION ALL SELECT pk, col0 FROM view_2_tab2_598
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_598 UNION SELECT pk, col0 FROM view_2_tab2_598
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 > 367) ) AS tab2_598
----
62 values hashing to 7129d36681b60af938fc89dba8fec07b

query I rowsort label-100-3
SELECT * FROM view_3_tab2_598
----
62 values hashing to 7129d36681b60af938fc89dba8fec07b

query I rowsort label-100-3
SELECT pk FROM tab2 WHERE (col0 > 367)
----
62 values hashing to 7129d36681b60af938fc89dba8fec07b

statement ok
DROP VIEW view_1_tab2_598

statement ok
DROP VIEW view_2_tab2_598

statement ok
DROP VIEW view_3_tab2_598

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_598 AS SELECT pk, col0 FROM tab3 WHERE (col0 > 367)

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

statement ok
CREATE VIEW view_3_tab3_598 AS SELECT pk FROM view_1_tab3_598

query II rowsort label-100-1
SELECT pk, col0 FROM tab3 WHERE (col0 > 367)
----
124 values hashing to c3125a3b14fb04b57cd334eea33b5fad

query II rowsort label-100-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 367))
----
76 values hashing to 48147d22c6fc43e4a29f4cf149e71109

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab3_598
----
124 values hashing to c3125a3b14fb04b57cd334eea33b5fad

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab3_598
----
76 values hashing to 48147d22c6fc43e4a29f4cf149e71109

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_598 UNION ALL SELECT pk, col0 FROM view_2_tab3_598
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_598 UNION SELECT pk, col0 FROM view_2_tab3_598
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 > 367) ) AS tab3_598
----
62 values hashing to 7129d36681b60af938fc89dba8fec07b

query I rowsort label-100-3
SELECT * FROM view_3_tab3_598
----
62 values hashing to 7129d36681b60af938fc89dba8fec07b

query I rowsort label-100-3
SELECT pk FROM tab3 WHERE (col0 > 367)
----
62 values hashing to 7129d36681b60af938fc89dba8fec07b

statement ok
DROP VIEW view_1_tab3_598

statement ok
DROP VIEW view_2_tab3_598

statement ok
DROP VIEW view_3_tab3_598

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_598 AS SELECT pk, col0 FROM tab4 WHERE (col0 > 367)

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

statement ok
CREATE VIEW view_3_tab4_598 AS SELECT pk FROM view_1_tab4_598

query II rowsort label-100-1
SELECT pk, col0 FROM tab4 WHERE (col0 > 367)
----
124 values hashing to c3125a3b14fb04b57cd334eea33b5fad

query II rowsort label-100-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 367))
----
76 values hashing to 48147d22c6fc43e4a29f4cf149e71109

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab4_598
----
124 values hashing to c3125a3b14fb04b57cd334eea33b5fad

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab4_598
----
76 values hashing to 48147d22c6fc43e4a29f4cf149e71109

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_598 UNION ALL SELECT pk, col0 FROM view_2_tab4_598
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_598 UNION SELECT pk, col0 FROM view_2_tab4_598
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 > 367) ) AS tab4_598
----
62 values hashing to 7129d36681b60af938fc89dba8fec07b

query I rowsort label-100-3
SELECT * FROM view_3_tab4_598
----
62 values hashing to 7129d36681b60af938fc89dba8fec07b

query I rowsort label-100-3
SELECT pk FROM tab4 WHERE (col0 > 367)
----
62 values hashing to 7129d36681b60af938fc89dba8fec07b

statement ok
DROP VIEW view_1_tab4_598

statement ok
DROP VIEW view_2_tab4_598

statement ok
DROP VIEW view_3_tab4_598

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_599 AS SELECT pk, col0 FROM tab0 WHERE col4 > 663.95

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

statement ok
CREATE VIEW view_3_tab0_599 AS SELECT pk FROM view_1_tab0_599

query II rowsort label-200-1
SELECT pk, col0 FROM tab0 WHERE col4 > 663.95
----
68 values hashing to 9c47187ed69233c56818637d95dba774

query II rowsort label-200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 663.95)
----
132 values hashing to 40f659a21cac27e922fc2c07848ec340

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab0_599
----
68 values hashing to 9c47187ed69233c56818637d95dba774

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab0_599
----
132 values hashing to 40f659a21cac27e922fc2c07848ec340

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 663.95 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 663.95)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_599 UNION ALL SELECT pk, col0 FROM view_2_tab0_599
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 663.95 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 663.95)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_599 UNION SELECT pk, col0 FROM view_2_tab0_599
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 > 663.95 ) AS tab0_599
----
34 values hashing to 22ace4f1eca9c5ec1901d7ac2ae55f7c

query I rowsort label-200-3
SELECT * FROM view_3_tab0_599
----
34 values hashing to 22ace4f1eca9c5ec1901d7ac2ae55f7c

query I rowsort label-200-3
SELECT pk FROM tab0 WHERE col4 > 663.95
----
34 values hashing to 22ace4f1eca9c5ec1901d7ac2ae55f7c

statement ok
DROP VIEW view_1_tab0_599

statement ok
DROP VIEW view_2_tab0_599

statement ok
DROP VIEW view_3_tab0_599

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_599 AS SELECT pk, col0 FROM tab1 WHERE col4 > 663.95

statement ok
CREATE VIEW view_2_tab1_599 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 663.95)

statement ok
CREATE VIEW view_3_tab1_599 AS SELECT pk FROM view_1_tab1_599

query II rowsort label-200-1
SELECT pk, col0 FROM tab1 WHERE col4 > 663.95
----
68 values hashing to 9c47187ed69233c56818637d95dba774

query II rowsort label-200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 663.95)
----
132 values hashing to 40f659a21cac27e922fc2c07848ec340

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab1_599
----
68 values hashing to 9c47187ed69233c56818637d95dba774

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab1_599
----
132 values hashing to 40f659a21cac27e922fc2c07848ec340

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 663.95 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 663.95)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_599 UNION ALL SELECT pk, col0 FROM view_2_tab1_599
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 663.95 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 663.95)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_599 UNION SELECT pk, col0 FROM view_2_tab1_599
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 > 663.95 ) AS tab1_599
----
34 values hashing to 22ace4f1eca9c5ec1901d7ac2ae55f7c

query I rowsort label-200-3
SELECT * FROM view_3_tab1_599
----
34 values hashing to 22ace4f1eca9c5ec1901d7ac2ae55f7c

query I rowsort label-200-3
SELECT pk FROM tab1 WHERE col4 > 663.95
----
34 values hashing to 22ace4f1eca9c5ec1901d7ac2ae55f7c

statement ok
DROP VIEW view_1_tab1_599

statement ok
DROP VIEW view_2_tab1_599

statement ok
DROP VIEW view_3_tab1_599

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_599 AS SELECT pk, col0 FROM tab2 WHERE col4 > 663.95

statement ok
CREATE VIEW view_2_tab2_599 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 663.95)

statement ok
CREATE VIEW view_3_tab2_599 AS SELECT pk FROM view_1_tab2_599

query II rowsort label-200-1
SELECT pk, col0 FROM tab2 WHERE col4 > 663.95
----
68 values hashing to 9c47187ed69233c56818637d95dba774

query II rowsort label-200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 663.95)
----
132 values hashing to 40f659a21cac27e922fc2c07848ec340

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab2_599
----
68 values hashing to 9c47187ed69233c56818637d95dba774

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab2_599
----
132 values hashing to 40f659a21cac27e922fc2c07848ec340

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 663.95 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 663.95)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_599 UNION ALL SELECT pk, col0 FROM view_2_tab2_599
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 663.95 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 663.95)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_599 UNION SELECT pk, col0 FROM view_2_tab2_599
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 > 663.95 ) AS tab2_599
----
34 values hashing to 22ace4f1eca9c5ec1901d7ac2ae55f7c

query I rowsort label-200-3
SELECT * FROM view_3_tab2_599
----
34 values hashing to 22ace4f1eca9c5ec1901d7ac2ae55f7c

query I rowsort label-200-3
SELECT pk FROM tab2 WHERE col4 > 663.95
----
34 values hashing to 22ace4f1eca9c5ec1901d7ac2ae55f7c

statement ok
DROP VIEW view_1_tab2_599

statement ok
DROP VIEW view_2_tab2_599

statement ok
DROP VIEW view_3_tab2_599

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_599 AS SELECT pk, col0 FROM tab3 WHERE col4 > 663.95

statement ok
CREATE VIEW view_2_tab3_599 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 663.95)

statement ok
CREATE VIEW view_3_tab3_599 AS SELECT pk FROM view_1_tab3_599

query II rowsort label-200-1
SELECT pk, col0 FROM tab3 WHERE col4 > 663.95
----
68 values hashing to 9c47187ed69233c56818637d95dba774

query II rowsort label-200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 663.95)
----
132 values hashing to 40f659a21cac27e922fc2c07848ec340

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab3_599
----
68 values hashing to 9c47187ed69233c56818637d95dba774

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab3_599
----
132 values hashing to 40f659a21cac27e922fc2c07848ec340

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 663.95 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 663.95)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_599 UNION ALL SELECT pk, col0 FROM view_2_tab3_599
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 663.95 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 663.95)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_599 UNION SELECT pk, col0 FROM view_2_tab3_599
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 > 663.95 ) AS tab3_599
----
34 values hashing to 22ace4f1eca9c5ec1901d7ac2ae55f7c

query I rowsort label-200-3
SELECT * FROM view_3_tab3_599
----
34 values hashing to 22ace4f1eca9c5ec1901d7ac2ae55f7c

query I rowsort label-200-3
SELECT pk FROM tab3 WHERE col4 > 663.95
----
34 values hashing to 22ace4f1eca9c5ec1901d7ac2ae55f7c

statement ok
DROP VIEW view_1_tab3_599

statement ok
DROP VIEW view_2_tab3_599

statement ok
DROP VIEW view_3_tab3_599

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_599 AS SELECT pk, col0 FROM tab4 WHERE col4 > 663.95

statement ok
CREATE VIEW view_2_tab4_599 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 663.95)

statement ok
CREATE VIEW view_3_tab4_599 AS SELECT pk FROM view_1_tab4_599

query II rowsort label-200-1
SELECT pk, col0 FROM tab4 WHERE col4 > 663.95
----
68 values hashing to 9c47187ed69233c56818637d95dba774

query II rowsort label-200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 663.95)
----
132 values hashing to 40f659a21cac27e922fc2c07848ec340

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab4_599
----
68 values hashing to 9c47187ed69233c56818637d95dba774

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab4_599
----
132 values hashing to 40f659a21cac27e922fc2c07848ec340

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 663.95 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 663.95)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_599 UNION ALL SELECT pk, col0 FROM view_2_tab4_599
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 663.95 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 663.95)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_599 UNION SELECT pk, col0 FROM view_2_tab4_599
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 > 663.95 ) AS tab4_599
----
34 values hashing to 22ace4f1eca9c5ec1901d7ac2ae55f7c

query I rowsort label-200-3
SELECT * FROM view_3_tab4_599
----
34 values hashing to 22ace4f1eca9c5ec1901d7ac2ae55f7c

query I rowsort label-200-3
SELECT pk FROM tab4 WHERE col4 > 663.95
----
34 values hashing to 22ace4f1eca9c5ec1901d7ac2ae55f7c

statement ok
DROP VIEW view_1_tab4_599

statement ok
DROP VIEW view_2_tab4_599

statement ok
DROP VIEW view_3_tab4_599

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_600 AS SELECT pk, col0 FROM tab0 WHERE col3 IN (10,321)

statement ok
CREATE VIEW view_2_tab0_600 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (10,321))

statement ok
CREATE VIEW view_3_tab0_600 AS SELECT pk FROM view_1_tab0_600

query II rowsort label-300-1
SELECT pk, col0 FROM tab0 WHERE col3 IN (10,321)
----

query II rowsort label-300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (10,321))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab0_600
----

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab0_600
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IN (10,321) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (10,321))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_600 UNION ALL SELECT pk, col0 FROM view_2_tab0_600
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IN (10,321) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (10,321))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_600 UNION SELECT pk, col0 FROM view_2_tab0_600
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 IN (10,321) ) AS tab0_600
----

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

query I rowsort label-300-3
SELECT pk FROM tab0 WHERE col3 IN (10,321)
----

statement ok
DROP VIEW view_1_tab0_600

statement ok
DROP VIEW view_2_tab0_600

statement ok
DROP VIEW view_3_tab0_600

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_600 AS SELECT pk, col0 FROM tab1 WHERE col3 IN (10,321)

statement ok
CREATE VIEW view_2_tab1_600 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (10,321))

statement ok
CREATE VIEW view_3_tab1_600 AS SELECT pk FROM view_1_tab1_600

query II rowsort label-300-1
SELECT pk, col0 FROM tab1 WHERE col3 IN (10,321)
----

query II rowsort label-300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (10,321))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab1_600
----

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab1_600
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IN (10,321) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (10,321))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_600 UNION ALL SELECT pk, col0 FROM view_2_tab1_600
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IN (10,321) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (10,321))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_600 UNION SELECT pk, col0 FROM view_2_tab1_600
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 IN (10,321) ) AS tab1_600
----

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

query I rowsort label-300-3
SELECT pk FROM tab1 WHERE col3 IN (10,321)
----

statement ok
DROP VIEW view_1_tab1_600

statement ok
DROP VIEW view_2_tab1_600

statement ok
DROP VIEW view_3_tab1_600

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_600 AS SELECT pk, col0 FROM tab2 WHERE col3 IN (10,321)

statement ok
CREATE VIEW view_2_tab2_600 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (10,321))

statement ok
CREATE VIEW view_3_tab2_600 AS SELECT pk FROM view_1_tab2_600

query II rowsort label-300-1
SELECT pk, col0 FROM tab2 WHERE col3 IN (10,321)
----

query II rowsort label-300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (10,321))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab2_600
----

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab2_600
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IN (10,321) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (10,321))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_600 UNION ALL SELECT pk, col0 FROM view_2_tab2_600
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IN (10,321) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (10,321))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_600 UNION SELECT pk, col0 FROM view_2_tab2_600
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 IN (10,321) ) AS tab2_600
----

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

query I rowsort label-300-3
SELECT pk FROM tab2 WHERE col3 IN (10,321)
----

statement ok
DROP VIEW view_1_tab2_600

statement ok
DROP VIEW view_2_tab2_600

statement ok
DROP VIEW view_3_tab2_600

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_600 AS SELECT pk, col0 FROM tab3 WHERE col3 IN (10,321)

statement ok
CREATE VIEW view_2_tab3_600 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (10,321))

statement ok
CREATE VIEW view_3_tab3_600 AS SELECT pk FROM view_1_tab3_600

query II rowsort label-300-1
SELECT pk, col0 FROM tab3 WHERE col3 IN (10,321)
----

query II rowsort label-300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (10,321))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab3_600
----

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab3_600
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IN (10,321) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (10,321))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_600 UNION ALL SELECT pk, col0 FROM view_2_tab3_600
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IN (10,321) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (10,321))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_600 UNION SELECT pk, col0 FROM view_2_tab3_600
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 IN (10,321) ) AS tab3_600
----

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

query I rowsort label-300-3
SELECT pk FROM tab3 WHERE col3 IN (10,321)
----

statement ok
DROP VIEW view_1_tab3_600

statement ok
DROP VIEW view_2_tab3_600

statement ok
DROP VIEW view_3_tab3_600

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_600 AS SELECT pk, col0 FROM tab4 WHERE col3 IN (10,321)

statement ok
CREATE VIEW view_2_tab4_600 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (10,321))

statement ok
CREATE VIEW view_3_tab4_600 AS SELECT pk FROM view_1_tab4_600

query II rowsort label-300-1
SELECT pk, col0 FROM tab4 WHERE col3 IN (10,321)
----

query II rowsort label-300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (10,321))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab4_600
----

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab4_600
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IN (10,321) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (10,321))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_600 UNION ALL SELECT pk, col0 FROM view_2_tab4_600
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IN (10,321) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (10,321))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_600 UNION SELECT pk, col0 FROM view_2_tab4_600
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 IN (10,321) ) AS tab4_600
----

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

query I rowsort label-300-3
SELECT pk FROM tab4 WHERE col3 IN (10,321)
----

statement ok
DROP VIEW view_1_tab4_600

statement ok
DROP VIEW view_2_tab4_600

statement ok
DROP VIEW view_3_tab4_600

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_601 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 671

statement ok
CREATE VIEW view_2_tab0_601 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 671)

statement ok
CREATE VIEW view_3_tab0_601 AS SELECT pk FROM view_1_tab0_601

query II rowsort label-400-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 671
----
148 values hashing to bafd48bb983c0779306bfaee1eefe010

query II rowsort label-400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 671)
----
52 values hashing to 80dbb83718c4df56e6822b4b32a12bb9

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab0_601
----
148 values hashing to bafd48bb983c0779306bfaee1eefe010

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab0_601
----
52 values hashing to 80dbb83718c4df56e6822b4b32a12bb9

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 671 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 671)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_601 UNION ALL SELECT pk, col0 FROM view_2_tab0_601
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 671 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 671)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_601 UNION SELECT pk, col0 FROM view_2_tab0_601
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 671 ) AS tab0_601
----
74 values hashing to 3996e69615d396b54745703a560e2a4c

query I rowsort label-400-3
SELECT * FROM view_3_tab0_601
----
74 values hashing to 3996e69615d396b54745703a560e2a4c

query I rowsort label-400-3
SELECT pk FROM tab0 WHERE col3 <= 671
----
74 values hashing to 3996e69615d396b54745703a560e2a4c

statement ok
DROP VIEW view_1_tab0_601

statement ok
DROP VIEW view_2_tab0_601

statement ok
DROP VIEW view_3_tab0_601

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_601 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 671

statement ok
CREATE VIEW view_2_tab1_601 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 671)

statement ok
CREATE VIEW view_3_tab1_601 AS SELECT pk FROM view_1_tab1_601

query II rowsort label-400-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 671
----
148 values hashing to bafd48bb983c0779306bfaee1eefe010

query II rowsort label-400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 671)
----
52 values hashing to 80dbb83718c4df56e6822b4b32a12bb9

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab1_601
----
148 values hashing to bafd48bb983c0779306bfaee1eefe010

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab1_601
----
52 values hashing to 80dbb83718c4df56e6822b4b32a12bb9

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 671 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 671)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_601 UNION ALL SELECT pk, col0 FROM view_2_tab1_601
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 671 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 671)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_601 UNION SELECT pk, col0 FROM view_2_tab1_601
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 671 ) AS tab1_601
----
74 values hashing to 3996e69615d396b54745703a560e2a4c

query I rowsort label-400-3
SELECT * FROM view_3_tab1_601
----
74 values hashing to 3996e69615d396b54745703a560e2a4c

query I rowsort label-400-3
SELECT pk FROM tab1 WHERE col3 <= 671
----
74 values hashing to 3996e69615d396b54745703a560e2a4c

statement ok
DROP VIEW view_1_tab1_601

statement ok
DROP VIEW view_2_tab1_601

statement ok
DROP VIEW view_3_tab1_601

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_601 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 671

statement ok
CREATE VIEW view_2_tab2_601 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 671)

statement ok
CREATE VIEW view_3_tab2_601 AS SELECT pk FROM view_1_tab2_601

query II rowsort label-400-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 671
----
148 values hashing to bafd48bb983c0779306bfaee1eefe010

query II rowsort label-400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 671)
----
52 values hashing to 80dbb83718c4df56e6822b4b32a12bb9

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab2_601
----
148 values hashing to bafd48bb983c0779306bfaee1eefe010

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab2_601
----
52 values hashing to 80dbb83718c4df56e6822b4b32a12bb9

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 671 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 671)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_601 UNION ALL SELECT pk, col0 FROM view_2_tab2_601
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 671 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 671)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_601 UNION SELECT pk, col0 FROM view_2_tab2_601
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 671 ) AS tab2_601
----
74 values hashing to 3996e69615d396b54745703a560e2a4c

query I rowsort label-400-3
SELECT * FROM view_3_tab2_601
----
74 values hashing to 3996e69615d396b54745703a560e2a4c

query I rowsort label-400-3
SELECT pk FROM tab2 WHERE col3 <= 671
----
74 values hashing to 3996e69615d396b54745703a560e2a4c

statement ok
DROP VIEW view_1_tab2_601

statement ok
DROP VIEW view_2_tab2_601

statement ok
DROP VIEW view_3_tab2_601

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_601 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 671

statement ok
CREATE VIEW view_2_tab3_601 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 671)

statement ok
CREATE VIEW view_3_tab3_601 AS SELECT pk FROM view_1_tab3_601

query II rowsort label-400-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 671
----
148 values hashing to bafd48bb983c0779306bfaee1eefe010

query II rowsort label-400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 671)
----
52 values hashing to 80dbb83718c4df56e6822b4b32a12bb9

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab3_601
----
148 values hashing to bafd48bb983c0779306bfaee1eefe010

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab3_601
----
52 values hashing to 80dbb83718c4df56e6822b4b32a12bb9

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 671 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 671)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_601 UNION ALL SELECT pk, col0 FROM view_2_tab3_601
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 671 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 671)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_601 UNION SELECT pk, col0 FROM view_2_tab3_601
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 671 ) AS tab3_601
----
74 values hashing to 3996e69615d396b54745703a560e2a4c

query I rowsort label-400-3
SELECT * FROM view_3_tab3_601
----
74 values hashing to 3996e69615d396b54745703a560e2a4c

query I rowsort label-400-3
SELECT pk FROM tab3 WHERE col3 <= 671
----
74 values hashing to 3996e69615d396b54745703a560e2a4c

statement ok
DROP VIEW view_1_tab3_601

statement ok
DROP VIEW view_2_tab3_601

statement ok
DROP VIEW view_3_tab3_601

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_601 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 671

statement ok
CREATE VIEW view_2_tab4_601 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 671)

statement ok
CREATE VIEW view_3_tab4_601 AS SELECT pk FROM view_1_tab4_601

query II rowsort label-400-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 671
----
148 values hashing to bafd48bb983c0779306bfaee1eefe010

query II rowsort label-400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 671)
----
52 values hashing to 80dbb83718c4df56e6822b4b32a12bb9

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab4_601
----
148 values hashing to bafd48bb983c0779306bfaee1eefe010

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab4_601
----
52 values hashing to 80dbb83718c4df56e6822b4b32a12bb9

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 671 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 671)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_601 UNION ALL SELECT pk, col0 FROM view_2_tab4_601
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 671 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 671)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_601 UNION SELECT pk, col0 FROM view_2_tab4_601
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 671 ) AS tab4_601
----
74 values hashing to 3996e69615d396b54745703a560e2a4c

query I rowsort label-400-3
SELECT * FROM view_3_tab4_601
----
74 values hashing to 3996e69615d396b54745703a560e2a4c

query I rowsort label-400-3
SELECT pk FROM tab4 WHERE col3 <= 671
----
74 values hashing to 3996e69615d396b54745703a560e2a4c

statement ok
DROP VIEW view_1_tab4_601

statement ok
DROP VIEW view_2_tab4_601

statement ok
DROP VIEW view_3_tab4_601

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_602 AS SELECT pk, col0 FROM tab0 WHERE col0 IN (SELECT col3 FROM tab0 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab0 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab0 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820)))

statement ok
CREATE VIEW view_2_tab0_602 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (SELECT col3 FROM tab0 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab0 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab0 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))

statement ok
CREATE VIEW view_3_tab0_602 AS SELECT pk FROM view_1_tab0_602

query II rowsort label-500-1
SELECT pk, col0 FROM tab0 WHERE col0 IN (SELECT col3 FROM tab0 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab0 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab0 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820)))
----
84 values hashing to b05b8d775407278478e455729c31db51

query II rowsort label-500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (SELECT col3 FROM tab0 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab0 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab0 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))
----
116 values hashing to b501b948961f24d1e464772ba098714b

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab0_602
----
84 values hashing to b05b8d775407278478e455729c31db51

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab0_602
----
116 values hashing to b501b948961f24d1e464772ba098714b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IN (SELECT col3 FROM tab0 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab0 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab0 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (SELECT col3 FROM tab0 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab0 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab0 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_602 UNION ALL SELECT pk, col0 FROM view_2_tab0_602
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IN (SELECT col3 FROM tab0 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab0 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab0 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (SELECT col3 FROM tab0 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab0 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab0 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_602 UNION SELECT pk, col0 FROM view_2_tab0_602
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 IN (SELECT col3 FROM tab0 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab0 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab0 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))) ) AS tab0_602
----
42 values hashing to 1a5c5ea02f9c7bb1e940e0d19bc8f819

query I rowsort label-500-3
SELECT * FROM view_3_tab0_602
----
42 values hashing to 1a5c5ea02f9c7bb1e940e0d19bc8f819

query I rowsort label-500-3
SELECT pk FROM tab0 WHERE col0 IN (SELECT col3 FROM tab0 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab0 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab0 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820)))
----
42 values hashing to 1a5c5ea02f9c7bb1e940e0d19bc8f819

statement ok
DROP VIEW view_1_tab0_602

statement ok
DROP VIEW view_2_tab0_602

statement ok
DROP VIEW view_3_tab0_602

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_602 AS SELECT pk, col0 FROM tab1 WHERE col0 IN (SELECT col3 FROM tab1 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab1 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab1 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820)))

statement ok
CREATE VIEW view_2_tab1_602 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (SELECT col3 FROM tab1 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab1 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab1 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))

statement ok
CREATE VIEW view_3_tab1_602 AS SELECT pk FROM view_1_tab1_602

query II rowsort label-500-1
SELECT pk, col0 FROM tab1 WHERE col0 IN (SELECT col3 FROM tab1 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab1 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab1 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820)))
----
84 values hashing to b05b8d775407278478e455729c31db51

query II rowsort label-500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (SELECT col3 FROM tab1 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab1 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab1 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))
----
116 values hashing to b501b948961f24d1e464772ba098714b

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab1_602
----
84 values hashing to b05b8d775407278478e455729c31db51

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab1_602
----
116 values hashing to b501b948961f24d1e464772ba098714b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IN (SELECT col3 FROM tab1 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab1 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab1 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (SELECT col3 FROM tab1 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab1 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab1 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_602 UNION ALL SELECT pk, col0 FROM view_2_tab1_602
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IN (SELECT col3 FROM tab1 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab1 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab1 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (SELECT col3 FROM tab1 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab1 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab1 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_602 UNION SELECT pk, col0 FROM view_2_tab1_602
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 IN (SELECT col3 FROM tab1 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab1 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab1 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))) ) AS tab1_602
----
42 values hashing to 1a5c5ea02f9c7bb1e940e0d19bc8f819

query I rowsort label-500-3
SELECT * FROM view_3_tab1_602
----
42 values hashing to 1a5c5ea02f9c7bb1e940e0d19bc8f819

query I rowsort label-500-3
SELECT pk FROM tab1 WHERE col0 IN (SELECT col3 FROM tab1 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab1 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab1 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820)))
----
42 values hashing to 1a5c5ea02f9c7bb1e940e0d19bc8f819

statement ok
DROP VIEW view_1_tab1_602

statement ok
DROP VIEW view_2_tab1_602

statement ok
DROP VIEW view_3_tab1_602

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_602 AS SELECT pk, col0 FROM tab2 WHERE col0 IN (SELECT col3 FROM tab2 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab2 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab2 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820)))

statement ok
CREATE VIEW view_2_tab2_602 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (SELECT col3 FROM tab2 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab2 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab2 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))

statement ok
CREATE VIEW view_3_tab2_602 AS SELECT pk FROM view_1_tab2_602

query II rowsort label-500-1
SELECT pk, col0 FROM tab2 WHERE col0 IN (SELECT col3 FROM tab2 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab2 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab2 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820)))
----
84 values hashing to b05b8d775407278478e455729c31db51

query II rowsort label-500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (SELECT col3 FROM tab2 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab2 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab2 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))
----
116 values hashing to b501b948961f24d1e464772ba098714b

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab2_602
----
84 values hashing to b05b8d775407278478e455729c31db51

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab2_602
----
116 values hashing to b501b948961f24d1e464772ba098714b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IN (SELECT col3 FROM tab2 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab2 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab2 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (SELECT col3 FROM tab2 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab2 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab2 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_602 UNION ALL SELECT pk, col0 FROM view_2_tab2_602
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IN (SELECT col3 FROM tab2 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab2 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab2 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (SELECT col3 FROM tab2 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab2 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab2 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_602 UNION SELECT pk, col0 FROM view_2_tab2_602
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 IN (SELECT col3 FROM tab2 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab2 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab2 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))) ) AS tab2_602
----
42 values hashing to 1a5c5ea02f9c7bb1e940e0d19bc8f819

query I rowsort label-500-3
SELECT * FROM view_3_tab2_602
----
42 values hashing to 1a5c5ea02f9c7bb1e940e0d19bc8f819

query I rowsort label-500-3
SELECT pk FROM tab2 WHERE col0 IN (SELECT col3 FROM tab2 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab2 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab2 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820)))
----
42 values hashing to 1a5c5ea02f9c7bb1e940e0d19bc8f819

statement ok
DROP VIEW view_1_tab2_602

statement ok
DROP VIEW view_2_tab2_602

statement ok
DROP VIEW view_3_tab2_602

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_602 AS SELECT pk, col0 FROM tab3 WHERE col0 IN (SELECT col3 FROM tab3 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab3 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab3 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820)))

statement ok
CREATE VIEW view_2_tab3_602 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (SELECT col3 FROM tab3 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab3 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab3 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))

statement ok
CREATE VIEW view_3_tab3_602 AS SELECT pk FROM view_1_tab3_602

query II rowsort label-500-1
SELECT pk, col0 FROM tab3 WHERE col0 IN (SELECT col3 FROM tab3 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab3 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab3 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820)))
----
84 values hashing to b05b8d775407278478e455729c31db51

query II rowsort label-500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (SELECT col3 FROM tab3 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab3 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab3 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))
----
116 values hashing to b501b948961f24d1e464772ba098714b

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab3_602
----
84 values hashing to b05b8d775407278478e455729c31db51

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab3_602
----
116 values hashing to b501b948961f24d1e464772ba098714b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IN (SELECT col3 FROM tab3 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab3 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab3 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (SELECT col3 FROM tab3 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab3 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab3 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_602 UNION ALL SELECT pk, col0 FROM view_2_tab3_602
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IN (SELECT col3 FROM tab3 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab3 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab3 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (SELECT col3 FROM tab3 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab3 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab3 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_602 UNION SELECT pk, col0 FROM view_2_tab3_602
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 IN (SELECT col3 FROM tab3 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab3 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab3 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))) ) AS tab3_602
----
42 values hashing to 1a5c5ea02f9c7bb1e940e0d19bc8f819

query I rowsort label-500-3
SELECT * FROM view_3_tab3_602
----
42 values hashing to 1a5c5ea02f9c7bb1e940e0d19bc8f819

query I rowsort label-500-3
SELECT pk FROM tab3 WHERE col0 IN (SELECT col3 FROM tab3 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab3 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab3 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820)))
----
42 values hashing to 1a5c5ea02f9c7bb1e940e0d19bc8f819

statement ok
DROP VIEW view_1_tab3_602

statement ok
DROP VIEW view_2_tab3_602

statement ok
DROP VIEW view_3_tab3_602

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_602 AS SELECT pk, col0 FROM tab4 WHERE col0 IN (SELECT col3 FROM tab4 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab4 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab4 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820)))

statement ok
CREATE VIEW view_2_tab4_602 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (SELECT col3 FROM tab4 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab4 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab4 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))

statement ok
CREATE VIEW view_3_tab4_602 AS SELECT pk FROM view_1_tab4_602

query II rowsort label-500-1
SELECT pk, col0 FROM tab4 WHERE col0 IN (SELECT col3 FROM tab4 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab4 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab4 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820)))
----
84 values hashing to b05b8d775407278478e455729c31db51

query II rowsort label-500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (SELECT col3 FROM tab4 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab4 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab4 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))
----
116 values hashing to b501b948961f24d1e464772ba098714b

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab4_602
----
84 values hashing to b05b8d775407278478e455729c31db51

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab4_602
----
116 values hashing to b501b948961f24d1e464772ba098714b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IN (SELECT col3 FROM tab4 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab4 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab4 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (SELECT col3 FROM tab4 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab4 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab4 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_602 UNION ALL SELECT pk, col0 FROM view_2_tab4_602
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IN (SELECT col3 FROM tab4 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab4 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab4 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (SELECT col3 FROM tab4 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab4 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab4 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_602 UNION SELECT pk, col0 FROM view_2_tab4_602
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 IN (SELECT col3 FROM tab4 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab4 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab4 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820))) ) AS tab4_602
----
42 values hashing to 1a5c5ea02f9c7bb1e940e0d19bc8f819

query I rowsort label-500-3
SELECT * FROM view_3_tab4_602
----
42 values hashing to 1a5c5ea02f9c7bb1e940e0d19bc8f819

query I rowsort label-500-3
SELECT pk FROM tab4 WHERE col0 IN (SELECT col3 FROM tab4 WHERE col0 >= 795) OR col3 >= 543 OR col3 > 991 AND (((col3 < 927 OR (col3 < 430)) AND (col0 > 590) OR (col0 >= 449 AND col4 > 729.35 OR (((col3 >= 745 AND col0 IN (376,260))) AND col0 = 742 OR ((col3 < 407))) AND col0 IN (SELECT col3 FROM tab4 WHERE (col4 = 553.85) AND (((col0 < 112)) OR (col3 > 499 AND (col1 < 892.72 OR col1 = 45.15 AND (col4 > 325.92 OR ((col3 > 799) AND col3 >= 373 AND (((((col3 <= 742)) AND col3 > 837))) AND col0 > 431 OR col0 > 614 OR ((col4 IN (128.97,578.47,613.81))) AND col0 = 579 AND col0 > 141) AND (col0 <= 50 AND ((col3 <= 640) OR (col0 = 347) AND (col0 >= 814) AND col3 > 355 OR col3 >= 216 OR col0 <= 695 AND ((col3 < 786 OR col3 > 720)) AND col3 > 646) AND col3 >= 67 OR (col3 < 139 AND col4 = 865.77 AND col3 BETWEEN 954 AND 133 OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 261 AND col0 > 477 OR col0 > 148 AND (col1 < 285.10) AND (col0 = 144) AND col3 IS NULL AND col1 > 284.82 AND col1 <= 217.12 OR col1 >= 690.53 AND col4 > 967.41 OR col0 BETWEEN 657 AND 38 AND (col1 > 833.26) OR col4 IS NULL OR (col0 IS NULL) AND (col3 < 419) AND col4 > 56.14 OR col0 < 971 AND (col0 >= 325) AND (col1 >= 333.69 AND col4 < 115.0) OR (col0 = 769) AND (col0 >= 302) AND col1 >= 948.69 OR (col1 < 488.22) AND col1 > 366.35 AND (col3 > 100) AND (col1 > 318.25 OR col3 > 322) AND ((col1 > 106.75)) OR col0 < 27 OR col0 >= 667) OR col0 < 840))) AND col4 IN (SELECT col1 FROM tab4 WHERE ((((col3 BETWEEN 846 AND 251)))))) OR (((col3 < 66 AND col4 = 146.82 AND ((((((col1 >= 404.9) AND col0 >= 148 AND (col0 >= 22) AND col0 >= 925 OR col0 >= 765 OR (col3 < 526))))))))) AND (col4 > 575.86 AND (col3 <= 62)) AND col1 > 494.37)) OR col3 < 544) OR (col0 >= 974) AND col1 < 631.39 OR col4 IN (200.63,43.35,782.64,301.38,958.13,883.69) OR col0 < 820)))
----
42 values hashing to 1a5c5ea02f9c7bb1e940e0d19bc8f819

statement ok
DROP VIEW view_1_tab4_602

statement ok
DROP VIEW view_2_tab4_602

statement ok
DROP VIEW view_3_tab4_602

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_603 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29

statement ok
CREATE VIEW view_2_tab0_603 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)

statement ok
CREATE VIEW view_3_tab0_603 AS SELECT pk FROM view_1_tab0_603

query II rowsort label-600-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29
----
36 values hashing to 5d33533929ffbfcdd45fc6ccd98528a4

query II rowsort label-600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)
----
164 values hashing to 01e660653a5cc54dd531a3810204e122

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab0_603
----
36 values hashing to 5d33533929ffbfcdd45fc6ccd98528a4

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab0_603
----
164 values hashing to 01e660653a5cc54dd531a3810204e122

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_603 UNION ALL SELECT pk, col0 FROM view_2_tab0_603
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_603 UNION SELECT pk, col0 FROM view_2_tab0_603
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29 ) AS tab0_603
----
18 values hashing to 65bd203ff1e552adc3ee01f0ffd3e7df

query I rowsort label-600-3
SELECT * FROM view_3_tab0_603
----
18 values hashing to 65bd203ff1e552adc3ee01f0ffd3e7df

query I rowsort label-600-3
SELECT pk FROM tab0 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29
----
18 values hashing to 65bd203ff1e552adc3ee01f0ffd3e7df

statement ok
DROP VIEW view_1_tab0_603

statement ok
DROP VIEW view_2_tab0_603

statement ok
DROP VIEW view_3_tab0_603

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_603 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29

statement ok
CREATE VIEW view_2_tab1_603 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)

statement ok
CREATE VIEW view_3_tab1_603 AS SELECT pk FROM view_1_tab1_603

query II rowsort label-600-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29
----
36 values hashing to 5d33533929ffbfcdd45fc6ccd98528a4

query II rowsort label-600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)
----
164 values hashing to 01e660653a5cc54dd531a3810204e122

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab1_603
----
36 values hashing to 5d33533929ffbfcdd45fc6ccd98528a4

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab1_603
----
164 values hashing to 01e660653a5cc54dd531a3810204e122

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_603 UNION ALL SELECT pk, col0 FROM view_2_tab1_603
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_603 UNION SELECT pk, col0 FROM view_2_tab1_603
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29 ) AS tab1_603
----
18 values hashing to 65bd203ff1e552adc3ee01f0ffd3e7df

query I rowsort label-600-3
SELECT * FROM view_3_tab1_603
----
18 values hashing to 65bd203ff1e552adc3ee01f0ffd3e7df

query I rowsort label-600-3
SELECT pk FROM tab1 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29
----
18 values hashing to 65bd203ff1e552adc3ee01f0ffd3e7df

statement ok
DROP VIEW view_1_tab1_603

statement ok
DROP VIEW view_2_tab1_603

statement ok
DROP VIEW view_3_tab1_603

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_603 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29

statement ok
CREATE VIEW view_2_tab2_603 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)

statement ok
CREATE VIEW view_3_tab2_603 AS SELECT pk FROM view_1_tab2_603

query II rowsort label-600-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29
----
36 values hashing to 5d33533929ffbfcdd45fc6ccd98528a4

query II rowsort label-600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)
----
164 values hashing to 01e660653a5cc54dd531a3810204e122

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab2_603
----
36 values hashing to 5d33533929ffbfcdd45fc6ccd98528a4

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab2_603
----
164 values hashing to 01e660653a5cc54dd531a3810204e122

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_603 UNION ALL SELECT pk, col0 FROM view_2_tab2_603
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_603 UNION SELECT pk, col0 FROM view_2_tab2_603
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29 ) AS tab2_603
----
18 values hashing to 65bd203ff1e552adc3ee01f0ffd3e7df

query I rowsort label-600-3
SELECT * FROM view_3_tab2_603
----
18 values hashing to 65bd203ff1e552adc3ee01f0ffd3e7df

query I rowsort label-600-3
SELECT pk FROM tab2 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29
----
18 values hashing to 65bd203ff1e552adc3ee01f0ffd3e7df

statement ok
DROP VIEW view_1_tab2_603

statement ok
DROP VIEW view_2_tab2_603

statement ok
DROP VIEW view_3_tab2_603

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_603 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29

statement ok
CREATE VIEW view_2_tab3_603 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)

statement ok
CREATE VIEW view_3_tab3_603 AS SELECT pk FROM view_1_tab3_603

query II rowsort label-600-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29
----
36 values hashing to 5d33533929ffbfcdd45fc6ccd98528a4

query II rowsort label-600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)
----
164 values hashing to 01e660653a5cc54dd531a3810204e122

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab3_603
----
36 values hashing to 5d33533929ffbfcdd45fc6ccd98528a4

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab3_603
----
164 values hashing to 01e660653a5cc54dd531a3810204e122

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_603 UNION ALL SELECT pk, col0 FROM view_2_tab3_603
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_603 UNION SELECT pk, col0 FROM view_2_tab3_603
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29 ) AS tab3_603
----
18 values hashing to 65bd203ff1e552adc3ee01f0ffd3e7df

query I rowsort label-600-3
SELECT * FROM view_3_tab3_603
----
18 values hashing to 65bd203ff1e552adc3ee01f0ffd3e7df

query I rowsort label-600-3
SELECT pk FROM tab3 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29
----
18 values hashing to 65bd203ff1e552adc3ee01f0ffd3e7df

statement ok
DROP VIEW view_1_tab3_603

statement ok
DROP VIEW view_2_tab3_603

statement ok
DROP VIEW view_3_tab3_603

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_603 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29

statement ok
CREATE VIEW view_2_tab4_603 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)

statement ok
CREATE VIEW view_3_tab4_603 AS SELECT pk FROM view_1_tab4_603

query II rowsort label-600-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29
----
36 values hashing to 5d33533929ffbfcdd45fc6ccd98528a4

query II rowsort label-600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)
----
164 values hashing to 01e660653a5cc54dd531a3810204e122

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab4_603
----
36 values hashing to 5d33533929ffbfcdd45fc6ccd98528a4

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab4_603
----
164 values hashing to 01e660653a5cc54dd531a3810204e122

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_603 UNION ALL SELECT pk, col0 FROM view_2_tab4_603
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_603 UNION SELECT pk, col0 FROM view_2_tab4_603
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29 ) AS tab4_603
----
18 values hashing to 65bd203ff1e552adc3ee01f0ffd3e7df

query I rowsort label-600-3
SELECT * FROM view_3_tab4_603
----
18 values hashing to 65bd203ff1e552adc3ee01f0ffd3e7df

query I rowsort label-600-3
SELECT pk FROM tab4 WHERE col0 >= 344 AND col4 >= 598.61 AND col1 < 670.29
----
18 values hashing to 65bd203ff1e552adc3ee01f0ffd3e7df

statement ok
DROP VIEW view_1_tab4_603

statement ok
DROP VIEW view_2_tab4_603

statement ok
DROP VIEW view_3_tab4_603

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_604 AS SELECT pk, col0 FROM tab0 WHERE col0 > 429

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

statement ok
CREATE VIEW view_3_tab0_604 AS SELECT pk FROM view_1_tab0_604

query II rowsort label-700-1
SELECT pk, col0 FROM tab0 WHERE col0 > 429
----
114 values hashing to 5bbf844b667cbe00215408e739112971

query II rowsort label-700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 429)
----
86 values hashing to 61387fc5462a2650ff2af23a62ad5874

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab0_604
----
114 values hashing to 5bbf844b667cbe00215408e739112971

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab0_604
----
86 values hashing to 61387fc5462a2650ff2af23a62ad5874

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_604 UNION ALL SELECT pk, col0 FROM view_2_tab0_604
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_604 UNION SELECT pk, col0 FROM view_2_tab0_604
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 429 ) AS tab0_604
----
57 values hashing to a1ae08b42bb8a06ffda5b6fab318f193

query I rowsort label-700-3
SELECT * FROM view_3_tab0_604
----
57 values hashing to a1ae08b42bb8a06ffda5b6fab318f193

query I rowsort label-700-3
SELECT pk FROM tab0 WHERE col0 > 429
----
57 values hashing to a1ae08b42bb8a06ffda5b6fab318f193

statement ok
DROP VIEW view_1_tab0_604

statement ok
DROP VIEW view_2_tab0_604

statement ok
DROP VIEW view_3_tab0_604

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_604 AS SELECT pk, col0 FROM tab1 WHERE col0 > 429

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

statement ok
CREATE VIEW view_3_tab1_604 AS SELECT pk FROM view_1_tab1_604

query II rowsort label-700-1
SELECT pk, col0 FROM tab1 WHERE col0 > 429
----
114 values hashing to 5bbf844b667cbe00215408e739112971

query II rowsort label-700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 429)
----
86 values hashing to 61387fc5462a2650ff2af23a62ad5874

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab1_604
----
114 values hashing to 5bbf844b667cbe00215408e739112971

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab1_604
----
86 values hashing to 61387fc5462a2650ff2af23a62ad5874

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_604 UNION ALL SELECT pk, col0 FROM view_2_tab1_604
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_604 UNION SELECT pk, col0 FROM view_2_tab1_604
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 429 ) AS tab1_604
----
57 values hashing to a1ae08b42bb8a06ffda5b6fab318f193

query I rowsort label-700-3
SELECT * FROM view_3_tab1_604
----
57 values hashing to a1ae08b42bb8a06ffda5b6fab318f193

query I rowsort label-700-3
SELECT pk FROM tab1 WHERE col0 > 429
----
57 values hashing to a1ae08b42bb8a06ffda5b6fab318f193

statement ok
DROP VIEW view_1_tab1_604

statement ok
DROP VIEW view_2_tab1_604

statement ok
DROP VIEW view_3_tab1_604

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_604 AS SELECT pk, col0 FROM tab2 WHERE col0 > 429

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

statement ok
CREATE VIEW view_3_tab2_604 AS SELECT pk FROM view_1_tab2_604

query II rowsort label-700-1
SELECT pk, col0 FROM tab2 WHERE col0 > 429
----
114 values hashing to 5bbf844b667cbe00215408e739112971

query II rowsort label-700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 429)
----
86 values hashing to 61387fc5462a2650ff2af23a62ad5874

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab2_604
----
114 values hashing to 5bbf844b667cbe00215408e739112971

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab2_604
----
86 values hashing to 61387fc5462a2650ff2af23a62ad5874

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_604 UNION ALL SELECT pk, col0 FROM view_2_tab2_604
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_604 UNION SELECT pk, col0 FROM view_2_tab2_604
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 429 ) AS tab2_604
----
57 values hashing to a1ae08b42bb8a06ffda5b6fab318f193

query I rowsort label-700-3
SELECT * FROM view_3_tab2_604
----
57 values hashing to a1ae08b42bb8a06ffda5b6fab318f193

query I rowsort label-700-3
SELECT pk FROM tab2 WHERE col0 > 429
----
57 values hashing to a1ae08b42bb8a06ffda5b6fab318f193

statement ok
DROP VIEW view_1_tab2_604

statement ok
DROP VIEW view_2_tab2_604

statement ok
DROP VIEW view_3_tab2_604

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_604 AS SELECT pk, col0 FROM tab3 WHERE col0 > 429

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

statement ok
CREATE VIEW view_3_tab3_604 AS SELECT pk FROM view_1_tab3_604

query II rowsort label-700-1
SELECT pk, col0 FROM tab3 WHERE col0 > 429
----
114 values hashing to 5bbf844b667cbe00215408e739112971

query II rowsort label-700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 429)
----
86 values hashing to 61387fc5462a2650ff2af23a62ad5874

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab3_604
----
114 values hashing to 5bbf844b667cbe00215408e739112971

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab3_604
----
86 values hashing to 61387fc5462a2650ff2af23a62ad5874

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_604 UNION ALL SELECT pk, col0 FROM view_2_tab3_604
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_604 UNION SELECT pk, col0 FROM view_2_tab3_604
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 429 ) AS tab3_604
----
57 values hashing to a1ae08b42bb8a06ffda5b6fab318f193

query I rowsort label-700-3
SELECT * FROM view_3_tab3_604
----
57 values hashing to a1ae08b42bb8a06ffda5b6fab318f193

query I rowsort label-700-3
SELECT pk FROM tab3 WHERE col0 > 429
----
57 values hashing to a1ae08b42bb8a06ffda5b6fab318f193

statement ok
DROP VIEW view_1_tab3_604

statement ok
DROP VIEW view_2_tab3_604

statement ok
DROP VIEW view_3_tab3_604

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_604 AS SELECT pk, col0 FROM tab4 WHERE col0 > 429

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

statement ok
CREATE VIEW view_3_tab4_604 AS SELECT pk FROM view_1_tab4_604

query II rowsort label-700-1
SELECT pk, col0 FROM tab4 WHERE col0 > 429
----
114 values hashing to 5bbf844b667cbe00215408e739112971

query II rowsort label-700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 429)
----
86 values hashing to 61387fc5462a2650ff2af23a62ad5874

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab4_604
----
114 values hashing to 5bbf844b667cbe00215408e739112971

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab4_604
----
86 values hashing to 61387fc5462a2650ff2af23a62ad5874

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_604 UNION ALL SELECT pk, col0 FROM view_2_tab4_604
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_604 UNION SELECT pk, col0 FROM view_2_tab4_604
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 429 ) AS tab4_604
----
57 values hashing to a1ae08b42bb8a06ffda5b6fab318f193

query I rowsort label-700-3
SELECT * FROM view_3_tab4_604
----
57 values hashing to a1ae08b42bb8a06ffda5b6fab318f193

query I rowsort label-700-3
SELECT pk FROM tab4 WHERE col0 > 429
----
57 values hashing to a1ae08b42bb8a06ffda5b6fab318f193

statement ok
DROP VIEW view_1_tab4_604

statement ok
DROP VIEW view_2_tab4_604

statement ok
DROP VIEW view_3_tab4_604

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_605 AS SELECT pk, col0 FROM tab0 WHERE col3 > 786

statement ok
CREATE VIEW view_2_tab0_605 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 786)

statement ok
CREATE VIEW view_3_tab0_605 AS SELECT pk FROM view_1_tab0_605

query II rowsort label-800-1
SELECT pk, col0 FROM tab0 WHERE col3 > 786
----
30 values hashing to bbf220253102f3d098d57a8cb8216e3a

query II rowsort label-800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 786)
----
170 values hashing to 4237490c5590bea6b268e85d901b78da

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab0_605
----
30 values hashing to bbf220253102f3d098d57a8cb8216e3a

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab0_605
----
170 values hashing to 4237490c5590bea6b268e85d901b78da

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_605 UNION ALL SELECT pk, col0 FROM view_2_tab0_605
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 786 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 786)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_605 UNION SELECT pk, col0 FROM view_2_tab0_605
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 786 ) AS tab0_605
----
15 values hashing to 7468f5aeea43e031afee943d222e772a

query I rowsort label-800-3
SELECT * FROM view_3_tab0_605
----
15 values hashing to 7468f5aeea43e031afee943d222e772a

query I rowsort label-800-3
SELECT pk FROM tab0 WHERE col3 > 786
----
15 values hashing to 7468f5aeea43e031afee943d222e772a

statement ok
DROP VIEW view_1_tab0_605

statement ok
DROP VIEW view_2_tab0_605

statement ok
DROP VIEW view_3_tab0_605

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_605 AS SELECT pk, col0 FROM tab1 WHERE col3 > 786

statement ok
CREATE VIEW view_2_tab1_605 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 786)

statement ok
CREATE VIEW view_3_tab1_605 AS SELECT pk FROM view_1_tab1_605

query II rowsort label-800-1
SELECT pk, col0 FROM tab1 WHERE col3 > 786
----
30 values hashing to bbf220253102f3d098d57a8cb8216e3a

query II rowsort label-800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 786)
----
170 values hashing to 4237490c5590bea6b268e85d901b78da

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab1_605
----
30 values hashing to bbf220253102f3d098d57a8cb8216e3a

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab1_605
----
170 values hashing to 4237490c5590bea6b268e85d901b78da

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 786 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 786)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_605 UNION ALL SELECT pk, col0 FROM view_2_tab1_605
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 786 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 786)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_605 UNION SELECT pk, col0 FROM view_2_tab1_605
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 786 ) AS tab1_605
----
15 values hashing to 7468f5aeea43e031afee943d222e772a

query I rowsort label-800-3
SELECT * FROM view_3_tab1_605
----
15 values hashing to 7468f5aeea43e031afee943d222e772a

query I rowsort label-800-3
SELECT pk FROM tab1 WHERE col3 > 786
----
15 values hashing to 7468f5aeea43e031afee943d222e772a

statement ok
DROP VIEW view_1_tab1_605

statement ok
DROP VIEW view_2_tab1_605

statement ok
DROP VIEW view_3_tab1_605

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_605 AS SELECT pk, col0 FROM tab2 WHERE col3 > 786

statement ok
CREATE VIEW view_2_tab2_605 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 786)

statement ok
CREATE VIEW view_3_tab2_605 AS SELECT pk FROM view_1_tab2_605

query II rowsort label-800-1
SELECT pk, col0 FROM tab2 WHERE col3 > 786
----
30 values hashing to bbf220253102f3d098d57a8cb8216e3a

query II rowsort label-800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 786)
----
170 values hashing to 4237490c5590bea6b268e85d901b78da

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab2_605
----
30 values hashing to bbf220253102f3d098d57a8cb8216e3a

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab2_605
----
170 values hashing to 4237490c5590bea6b268e85d901b78da

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 786 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 786)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_605 UNION ALL SELECT pk, col0 FROM view_2_tab2_605
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 786 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 786)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_605 UNION SELECT pk, col0 FROM view_2_tab2_605
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 786 ) AS tab2_605
----
15 values hashing to 7468f5aeea43e031afee943d222e772a

query I rowsort label-800-3
SELECT * FROM view_3_tab2_605
----
15 values hashing to 7468f5aeea43e031afee943d222e772a

query I rowsort label-800-3
SELECT pk FROM tab2 WHERE col3 > 786
----
15 values hashing to 7468f5aeea43e031afee943d222e772a

statement ok
DROP VIEW view_1_tab2_605

statement ok
DROP VIEW view_2_tab2_605

statement ok
DROP VIEW view_3_tab2_605

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_605 AS SELECT pk, col0 FROM tab3 WHERE col3 > 786

statement ok
CREATE VIEW view_2_tab3_605 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 786)

statement ok
CREATE VIEW view_3_tab3_605 AS SELECT pk FROM view_1_tab3_605

query II rowsort label-800-1
SELECT pk, col0 FROM tab3 WHERE col3 > 786
----
30 values hashing to bbf220253102f3d098d57a8cb8216e3a

query II rowsort label-800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 786)
----
170 values hashing to 4237490c5590bea6b268e85d901b78da

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab3_605
----
30 values hashing to bbf220253102f3d098d57a8cb8216e3a

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab3_605
----
170 values hashing to 4237490c5590bea6b268e85d901b78da

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 786 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 786)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_605 UNION ALL SELECT pk, col0 FROM view_2_tab3_605
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 786 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 786)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_605 UNION SELECT pk, col0 FROM view_2_tab3_605
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 786 ) AS tab3_605
----
15 values hashing to 7468f5aeea43e031afee943d222e772a

query I rowsort label-800-3
SELECT * FROM view_3_tab3_605
----
15 values hashing to 7468f5aeea43e031afee943d222e772a

query I rowsort label-800-3
SELECT pk FROM tab3 WHERE col3 > 786
----
15 values hashing to 7468f5aeea43e031afee943d222e772a

statement ok
DROP VIEW view_1_tab3_605

statement ok
DROP VIEW view_2_tab3_605

statement ok
DROP VIEW view_3_tab3_605

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_605 AS SELECT pk, col0 FROM tab4 WHERE col3 > 786

statement ok
CREATE VIEW view_2_tab4_605 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 786)

statement ok
CREATE VIEW view_3_tab4_605 AS SELECT pk FROM view_1_tab4_605

query II rowsort label-800-1
SELECT pk, col0 FROM tab4 WHERE col3 > 786
----
30 values hashing to bbf220253102f3d098d57a8cb8216e3a

query II rowsort label-800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 786)
----
170 values hashing to 4237490c5590bea6b268e85d901b78da

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab4_605
----
30 values hashing to bbf220253102f3d098d57a8cb8216e3a

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab4_605
----
170 values hashing to 4237490c5590bea6b268e85d901b78da

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 786 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 786)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_605 UNION ALL SELECT pk, col0 FROM view_2_tab4_605
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 786 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 786)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_605 UNION SELECT pk, col0 FROM view_2_tab4_605
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 786 ) AS tab4_605
----
15 values hashing to 7468f5aeea43e031afee943d222e772a

query I rowsort label-800-3
SELECT * FROM view_3_tab4_605
----
15 values hashing to 7468f5aeea43e031afee943d222e772a

query I rowsort label-800-3
SELECT pk FROM tab4 WHERE col3 > 786
----
15 values hashing to 7468f5aeea43e031afee943d222e772a

statement ok
DROP VIEW view_1_tab4_605

statement ok
DROP VIEW view_2_tab4_605

statement ok
DROP VIEW view_3_tab4_605

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_606 AS SELECT pk, col0 FROM tab0 WHERE (col3 > 274 AND col0 >= 182)

statement ok
CREATE VIEW view_2_tab0_606 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 274 AND col0 >= 182))

statement ok
CREATE VIEW view_3_tab0_606 AS SELECT pk FROM view_1_tab0_606

query II rowsort label-900-1
SELECT pk, col0 FROM tab0 WHERE (col3 > 274 AND col0 >= 182)
----
94 values hashing to 6de84e0938abd77c80a1883c80fccf51

query II rowsort label-900-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 274 AND col0 >= 182))
----
106 values hashing to d0f486dc52cba94dd74bc4836e2502bd

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab0_606
----
94 values hashing to 6de84e0938abd77c80a1883c80fccf51

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab0_606
----
106 values hashing to d0f486dc52cba94dd74bc4836e2502bd

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 274 AND col0 >= 182) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 274 AND col0 >= 182))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_606 UNION ALL SELECT pk, col0 FROM view_2_tab0_606
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 274 AND col0 >= 182) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 274 AND col0 >= 182))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_606 UNION SELECT pk, col0 FROM view_2_tab0_606
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 > 274 AND col0 >= 182) ) AS tab0_606
----
47 values hashing to 7a3f888d612cd16115db8160b0ad5016

query I rowsort label-900-3
SELECT * FROM view_3_tab0_606
----
47 values hashing to 7a3f888d612cd16115db8160b0ad5016

query I rowsort label-900-3
SELECT pk FROM tab0 WHERE (col3 > 274 AND col0 >= 182)
----
47 values hashing to 7a3f888d612cd16115db8160b0ad5016

statement ok
DROP VIEW view_1_tab0_606

statement ok
DROP VIEW view_2_tab0_606

statement ok
DROP VIEW view_3_tab0_606

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_606 AS SELECT pk, col0 FROM tab1 WHERE (col3 > 274 AND col0 >= 182)

statement ok
CREATE VIEW view_2_tab1_606 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 274 AND col0 >= 182))

statement ok
CREATE VIEW view_3_tab1_606 AS SELECT pk FROM view_1_tab1_606

query II rowsort label-900-1
SELECT pk, col0 FROM tab1 WHERE (col3 > 274 AND col0 >= 182)
----
94 values hashing to 6de84e0938abd77c80a1883c80fccf51

query II rowsort label-900-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 274 AND col0 >= 182))
----
106 values hashing to d0f486dc52cba94dd74bc4836e2502bd

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab1_606
----
94 values hashing to 6de84e0938abd77c80a1883c80fccf51

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab1_606
----
106 values hashing to d0f486dc52cba94dd74bc4836e2502bd

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 274 AND col0 >= 182) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 274 AND col0 >= 182))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_606 UNION ALL SELECT pk, col0 FROM view_2_tab1_606
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 274 AND col0 >= 182) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 274 AND col0 >= 182))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_606 UNION SELECT pk, col0 FROM view_2_tab1_606
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 > 274 AND col0 >= 182) ) AS tab1_606
----
47 values hashing to 7a3f888d612cd16115db8160b0ad5016

query I rowsort label-900-3
SELECT * FROM view_3_tab1_606
----
47 values hashing to 7a3f888d612cd16115db8160b0ad5016

query I rowsort label-900-3
SELECT pk FROM tab1 WHERE (col3 > 274 AND col0 >= 182)
----
47 values hashing to 7a3f888d612cd16115db8160b0ad5016

statement ok
DROP VIEW view_1_tab1_606

statement ok
DROP VIEW view_2_tab1_606

statement ok
DROP VIEW view_3_tab1_606

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_606 AS SELECT pk, col0 FROM tab2 WHERE (col3 > 274 AND col0 >= 182)

statement ok
CREATE VIEW view_2_tab2_606 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 274 AND col0 >= 182))

statement ok
CREATE VIEW view_3_tab2_606 AS SELECT pk FROM view_1_tab2_606

query II rowsort label-900-1
SELECT pk, col0 FROM tab2 WHERE (col3 > 274 AND col0 >= 182)
----
94 values hashing to 6de84e0938abd77c80a1883c80fccf51

query II rowsort label-900-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 274 AND col0 >= 182))
----
106 values hashing to d0f486dc52cba94dd74bc4836e2502bd

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab2_606
----
94 values hashing to 6de84e0938abd77c80a1883c80fccf51

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab2_606
----
106 values hashing to d0f486dc52cba94dd74bc4836e2502bd

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 274 AND col0 >= 182) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 274 AND col0 >= 182))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_606 UNION ALL SELECT pk, col0 FROM view_2_tab2_606
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 274 AND col0 >= 182) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 274 AND col0 >= 182))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_606 UNION SELECT pk, col0 FROM view_2_tab2_606
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 > 274 AND col0 >= 182) ) AS tab2_606
----
47 values hashing to 7a3f888d612cd16115db8160b0ad5016

query I rowsort label-900-3
SELECT * FROM view_3_tab2_606
----
47 values hashing to 7a3f888d612cd16115db8160b0ad5016

query I rowsort label-900-3
SELECT pk FROM tab2 WHERE (col3 > 274 AND col0 >= 182)
----
47 values hashing to 7a3f888d612cd16115db8160b0ad5016

statement ok
DROP VIEW view_1_tab2_606

statement ok
DROP VIEW view_2_tab2_606

statement ok
DROP VIEW view_3_tab2_606

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_606 AS SELECT pk, col0 FROM tab3 WHERE (col3 > 274 AND col0 >= 182)

statement ok
CREATE VIEW view_2_tab3_606 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 274 AND col0 >= 182))

statement ok
CREATE VIEW view_3_tab3_606 AS SELECT pk FROM view_1_tab3_606

query II rowsort label-900-1
SELECT pk, col0 FROM tab3 WHERE (col3 > 274 AND col0 >= 182)
----
94 values hashing to 6de84e0938abd77c80a1883c80fccf51

query II rowsort label-900-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 274 AND col0 >= 182))
----
106 values hashing to d0f486dc52cba94dd74bc4836e2502bd

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab3_606
----
94 values hashing to 6de84e0938abd77c80a1883c80fccf51

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab3_606
----
106 values hashing to d0f486dc52cba94dd74bc4836e2502bd

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 274 AND col0 >= 182) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 274 AND col0 >= 182))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_606 UNION ALL SELECT pk, col0 FROM view_2_tab3_606
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 274 AND col0 >= 182) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 274 AND col0 >= 182))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_606 UNION SELECT pk, col0 FROM view_2_tab3_606
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 > 274 AND col0 >= 182) ) AS tab3_606
----
47 values hashing to 7a3f888d612cd16115db8160b0ad5016

query I rowsort label-900-3
SELECT * FROM view_3_tab3_606
----
47 values hashing to 7a3f888d612cd16115db8160b0ad5016

query I rowsort label-900-3
SELECT pk FROM tab3 WHERE (col3 > 274 AND col0 >= 182)
----
47 values hashing to 7a3f888d612cd16115db8160b0ad5016

statement ok
DROP VIEW view_1_tab3_606

statement ok
DROP VIEW view_2_tab3_606

statement ok
DROP VIEW view_3_tab3_606

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_606 AS SELECT pk, col0 FROM tab4 WHERE (col3 > 274 AND col0 >= 182)

statement ok
CREATE VIEW view_2_tab4_606 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 274 AND col0 >= 182))

statement ok
CREATE VIEW view_3_tab4_606 AS SELECT pk FROM view_1_tab4_606

query II rowsort label-900-1
SELECT pk, col0 FROM tab4 WHERE (col3 > 274 AND col0 >= 182)
----
94 values hashing to 6de84e0938abd77c80a1883c80fccf51

query II rowsort label-900-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 274 AND col0 >= 182))
----
106 values hashing to d0f486dc52cba94dd74bc4836e2502bd

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab4_606
----
94 values hashing to 6de84e0938abd77c80a1883c80fccf51

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab4_606
----
106 values hashing to d0f486dc52cba94dd74bc4836e2502bd

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 274 AND col0 >= 182) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 274 AND col0 >= 182))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_606 UNION ALL SELECT pk, col0 FROM view_2_tab4_606
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 274 AND col0 >= 182) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 274 AND col0 >= 182))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_606 UNION SELECT pk, col0 FROM view_2_tab4_606
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 > 274 AND col0 >= 182) ) AS tab4_606
----
47 values hashing to 7a3f888d612cd16115db8160b0ad5016

query I rowsort label-900-3
SELECT * FROM view_3_tab4_606
----
47 values hashing to 7a3f888d612cd16115db8160b0ad5016

query I rowsort label-900-3
SELECT pk FROM tab4 WHERE (col3 > 274 AND col0 >= 182)
----
47 values hashing to 7a3f888d612cd16115db8160b0ad5016

statement ok
DROP VIEW view_1_tab4_606

statement ok
DROP VIEW view_2_tab4_606

statement ok
DROP VIEW view_3_tab4_606

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_607 AS SELECT pk, col0 FROM tab0 WHERE ((col3 > 992) OR col0 <= 373)

statement ok
CREATE VIEW view_2_tab0_607 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 992) OR col0 <= 373))

statement ok
CREATE VIEW view_3_tab0_607 AS SELECT pk FROM view_1_tab0_607

query II rowsort label-1000-1
SELECT pk, col0 FROM tab0 WHERE ((col3 > 992) OR col0 <= 373)
----
80 values hashing to eab06d05f24051ff4481d0062bd8b2a8

query II rowsort label-1000-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 992) OR col0 <= 373))
----
120 values hashing to 7a3973943dd74246050245541baa80c3

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab0_607
----
80 values hashing to eab06d05f24051ff4481d0062bd8b2a8

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab0_607
----
120 values hashing to 7a3973943dd74246050245541baa80c3

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 > 992) OR col0 <= 373) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 992) OR col0 <= 373))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_607 UNION ALL SELECT pk, col0 FROM view_2_tab0_607
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 > 992) OR col0 <= 373) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 992) OR col0 <= 373))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_607 UNION SELECT pk, col0 FROM view_2_tab0_607
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 > 992) OR col0 <= 373) ) AS tab0_607
----
40 values hashing to 3b1e18d0c56fc30d567e412c4c82229b

query I rowsort label-1000-3
SELECT * FROM view_3_tab0_607
----
40 values hashing to 3b1e18d0c56fc30d567e412c4c82229b

query I rowsort label-1000-3
SELECT pk FROM tab0 WHERE ((col3 > 992) OR col0 <= 373)
----
40 values hashing to 3b1e18d0c56fc30d567e412c4c82229b

statement ok
DROP VIEW view_1_tab0_607

statement ok
DROP VIEW view_2_tab0_607

statement ok
DROP VIEW view_3_tab0_607

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_607 AS SELECT pk, col0 FROM tab1 WHERE ((col3 > 992) OR col0 <= 373)

statement ok
CREATE VIEW view_2_tab1_607 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 992) OR col0 <= 373))

statement ok
CREATE VIEW view_3_tab1_607 AS SELECT pk FROM view_1_tab1_607

query II rowsort label-1000-1
SELECT pk, col0 FROM tab1 WHERE ((col3 > 992) OR col0 <= 373)
----
80 values hashing to eab06d05f24051ff4481d0062bd8b2a8

query II rowsort label-1000-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 992) OR col0 <= 373))
----
120 values hashing to 7a3973943dd74246050245541baa80c3

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab1_607
----
80 values hashing to eab06d05f24051ff4481d0062bd8b2a8

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab1_607
----
120 values hashing to 7a3973943dd74246050245541baa80c3

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 > 992) OR col0 <= 373) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 992) OR col0 <= 373))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_607 UNION ALL SELECT pk, col0 FROM view_2_tab1_607
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 > 992) OR col0 <= 373) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 992) OR col0 <= 373))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_607 UNION SELECT pk, col0 FROM view_2_tab1_607
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 > 992) OR col0 <= 373) ) AS tab1_607
----
40 values hashing to 3b1e18d0c56fc30d567e412c4c82229b

query I rowsort label-1000-3
SELECT * FROM view_3_tab1_607
----
40 values hashing to 3b1e18d0c56fc30d567e412c4c82229b

query I rowsort label-1000-3
SELECT pk FROM tab1 WHERE ((col3 > 992) OR col0 <= 373)
----
40 values hashing to 3b1e18d0c56fc30d567e412c4c82229b

statement ok
DROP VIEW view_1_tab1_607

statement ok
DROP VIEW view_2_tab1_607

statement ok
DROP VIEW view_3_tab1_607

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_607 AS SELECT pk, col0 FROM tab2 WHERE ((col3 > 992) OR col0 <= 373)

statement ok
CREATE VIEW view_2_tab2_607 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 992) OR col0 <= 373))

statement ok
CREATE VIEW view_3_tab2_607 AS SELECT pk FROM view_1_tab2_607

query II rowsort label-1000-1
SELECT pk, col0 FROM tab2 WHERE ((col3 > 992) OR col0 <= 373)
----
80 values hashing to eab06d05f24051ff4481d0062bd8b2a8

query II rowsort label-1000-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 992) OR col0 <= 373))
----
120 values hashing to 7a3973943dd74246050245541baa80c3

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab2_607
----
80 values hashing to eab06d05f24051ff4481d0062bd8b2a8

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab2_607
----
120 values hashing to 7a3973943dd74246050245541baa80c3

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 > 992) OR col0 <= 373) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 992) OR col0 <= 373))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_607 UNION ALL SELECT pk, col0 FROM view_2_tab2_607
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 > 992) OR col0 <= 373) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 992) OR col0 <= 373))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_607 UNION SELECT pk, col0 FROM view_2_tab2_607
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 > 992) OR col0 <= 373) ) AS tab2_607
----
40 values hashing to 3b1e18d0c56fc30d567e412c4c82229b

query I rowsort label-1000-3
SELECT * FROM view_3_tab2_607
----
40 values hashing to 3b1e18d0c56fc30d567e412c4c82229b

query I rowsort label-1000-3
SELECT pk FROM tab2 WHERE ((col3 > 992) OR col0 <= 373)
----
40 values hashing to 3b1e18d0c56fc30d567e412c4c82229b

statement ok
DROP VIEW view_1_tab2_607

statement ok
DROP VIEW view_2_tab2_607

statement ok
DROP VIEW view_3_tab2_607

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_607 AS SELECT pk, col0 FROM tab3 WHERE ((col3 > 992) OR col0 <= 373)

statement ok
CREATE VIEW view_2_tab3_607 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 992) OR col0 <= 373))

statement ok
CREATE VIEW view_3_tab3_607 AS SELECT pk FROM view_1_tab3_607

query II rowsort label-1000-1
SELECT pk, col0 FROM tab3 WHERE ((col3 > 992) OR col0 <= 373)
----
80 values hashing to eab06d05f24051ff4481d0062bd8b2a8

query II rowsort label-1000-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 992) OR col0 <= 373))
----
120 values hashing to 7a3973943dd74246050245541baa80c3

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab3_607
----
80 values hashing to eab06d05f24051ff4481d0062bd8b2a8

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab3_607
----
120 values hashing to 7a3973943dd74246050245541baa80c3

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 > 992) OR col0 <= 373) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 992) OR col0 <= 373))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_607 UNION ALL SELECT pk, col0 FROM view_2_tab3_607
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 > 992) OR col0 <= 373) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 992) OR col0 <= 373))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_607 UNION SELECT pk, col0 FROM view_2_tab3_607
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 > 992) OR col0 <= 373) ) AS tab3_607
----
40 values hashing to 3b1e18d0c56fc30d567e412c4c82229b

query I rowsort label-1000-3
SELECT * FROM view_3_tab3_607
----
40 values hashing to 3b1e18d0c56fc30d567e412c4c82229b

query I rowsort label-1000-3
SELECT pk FROM tab3 WHERE ((col3 > 992) OR col0 <= 373)
----
40 values hashing to 3b1e18d0c56fc30d567e412c4c82229b

statement ok
DROP VIEW view_1_tab3_607

statement ok
DROP VIEW view_2_tab3_607

statement ok
DROP VIEW view_3_tab3_607

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_607 AS SELECT pk, col0 FROM tab4 WHERE ((col3 > 992) OR col0 <= 373)

statement ok
CREATE VIEW view_2_tab4_607 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 992) OR col0 <= 373))

statement ok
CREATE VIEW view_3_tab4_607 AS SELECT pk FROM view_1_tab4_607

query II rowsort label-1000-1
SELECT pk, col0 FROM tab4 WHERE ((col3 > 992) OR col0 <= 373)
----
80 values hashing to eab06d05f24051ff4481d0062bd8b2a8

query II rowsort label-1000-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 992) OR col0 <= 373))
----
120 values hashing to 7a3973943dd74246050245541baa80c3

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab4_607
----
80 values hashing to eab06d05f24051ff4481d0062bd8b2a8

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab4_607
----
120 values hashing to 7a3973943dd74246050245541baa80c3

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 > 992) OR col0 <= 373) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 992) OR col0 <= 373))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_607 UNION ALL SELECT pk, col0 FROM view_2_tab4_607
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 > 992) OR col0 <= 373) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 992) OR col0 <= 373))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_607 UNION SELECT pk, col0 FROM view_2_tab4_607
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 > 992) OR col0 <= 373) ) AS tab4_607
----
40 values hashing to 3b1e18d0c56fc30d567e412c4c82229b

query I rowsort label-1000-3
SELECT * FROM view_3_tab4_607
----
40 values hashing to 3b1e18d0c56fc30d567e412c4c82229b

query I rowsort label-1000-3
SELECT pk FROM tab4 WHERE ((col3 > 992) OR col0 <= 373)
----
40 values hashing to 3b1e18d0c56fc30d567e412c4c82229b

statement ok
DROP VIEW view_1_tab4_607

statement ok
DROP VIEW view_2_tab4_607

statement ok
DROP VIEW view_3_tab4_607

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_608 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 627

statement ok
CREATE VIEW view_2_tab0_608 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 627)

statement ok
CREATE VIEW view_3_tab0_608 AS SELECT pk FROM view_1_tab0_608

query II rowsort label-1100-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 627
----
124 values hashing to cf728b3059bdaf8c6a98568df85a7918

query II rowsort label-1100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 627)
----
76 values hashing to 37ea72d1b5d5f514197588b9b8f4c72e

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab0_608
----
124 values hashing to cf728b3059bdaf8c6a98568df85a7918

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab0_608
----
76 values hashing to 37ea72d1b5d5f514197588b9b8f4c72e

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 627 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 627)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_608 UNION ALL SELECT pk, col0 FROM view_2_tab0_608
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 627 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 627)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_608 UNION SELECT pk, col0 FROM view_2_tab0_608
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 627 ) AS tab0_608
----
62 values hashing to 66d743753f010a83a3d0f2a51d63876e

query I rowsort label-1100-3
SELECT * FROM view_3_tab0_608
----
62 values hashing to 66d743753f010a83a3d0f2a51d63876e

query I rowsort label-1100-3
SELECT pk FROM tab0 WHERE col0 <= 627
----
62 values hashing to 66d743753f010a83a3d0f2a51d63876e

statement ok
DROP VIEW view_1_tab0_608

statement ok
DROP VIEW view_2_tab0_608

statement ok
DROP VIEW view_3_tab0_608

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_608 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 627

statement ok
CREATE VIEW view_2_tab1_608 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 627)

statement ok
CREATE VIEW view_3_tab1_608 AS SELECT pk FROM view_1_tab1_608

query II rowsort label-1100-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 627
----
124 values hashing to cf728b3059bdaf8c6a98568df85a7918

query II rowsort label-1100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 627)
----
76 values hashing to 37ea72d1b5d5f514197588b9b8f4c72e

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab1_608
----
124 values hashing to cf728b3059bdaf8c6a98568df85a7918

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab1_608
----
76 values hashing to 37ea72d1b5d5f514197588b9b8f4c72e

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 627 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 627)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_608 UNION ALL SELECT pk, col0 FROM view_2_tab1_608
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 627 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 627)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_608 UNION SELECT pk, col0 FROM view_2_tab1_608
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 627 ) AS tab1_608
----
62 values hashing to 66d743753f010a83a3d0f2a51d63876e

query I rowsort label-1100-3
SELECT * FROM view_3_tab1_608
----
62 values hashing to 66d743753f010a83a3d0f2a51d63876e

query I rowsort label-1100-3
SELECT pk FROM tab1 WHERE col0 <= 627
----
62 values hashing to 66d743753f010a83a3d0f2a51d63876e

statement ok
DROP VIEW view_1_tab1_608

statement ok
DROP VIEW view_2_tab1_608

statement ok
DROP VIEW view_3_tab1_608

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_608 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 627

statement ok
CREATE VIEW view_2_tab2_608 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 627)

statement ok
CREATE VIEW view_3_tab2_608 AS SELECT pk FROM view_1_tab2_608

query II rowsort label-1100-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 627
----
124 values hashing to cf728b3059bdaf8c6a98568df85a7918

query II rowsort label-1100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 627)
----
76 values hashing to 37ea72d1b5d5f514197588b9b8f4c72e

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab2_608
----
124 values hashing to cf728b3059bdaf8c6a98568df85a7918

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab2_608
----
76 values hashing to 37ea72d1b5d5f514197588b9b8f4c72e

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 627 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 627)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_608 UNION ALL SELECT pk, col0 FROM view_2_tab2_608
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 627 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 627)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_608 UNION SELECT pk, col0 FROM view_2_tab2_608
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 627 ) AS tab2_608
----
62 values hashing to 66d743753f010a83a3d0f2a51d63876e

query I rowsort label-1100-3
SELECT * FROM view_3_tab2_608
----
62 values hashing to 66d743753f010a83a3d0f2a51d63876e

query I rowsort label-1100-3
SELECT pk FROM tab2 WHERE col0 <= 627
----
62 values hashing to 66d743753f010a83a3d0f2a51d63876e

statement ok
DROP VIEW view_1_tab2_608

statement ok
DROP VIEW view_2_tab2_608

statement ok
DROP VIEW view_3_tab2_608

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_608 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 627

statement ok
CREATE VIEW view_2_tab3_608 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 627)

statement ok
CREATE VIEW view_3_tab3_608 AS SELECT pk FROM view_1_tab3_608

query II rowsort label-1100-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 627
----
124 values hashing to cf728b3059bdaf8c6a98568df85a7918

query II rowsort label-1100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 627)
----
76 values hashing to 37ea72d1b5d5f514197588b9b8f4c72e

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab3_608
----
124 values hashing to cf728b3059bdaf8c6a98568df85a7918

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab3_608
----
76 values hashing to 37ea72d1b5d5f514197588b9b8f4c72e

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 627 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 627)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_608 UNION ALL SELECT pk, col0 FROM view_2_tab3_608
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 627 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 627)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_608 UNION SELECT pk, col0 FROM view_2_tab3_608
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 627 ) AS tab3_608
----
62 values hashing to 66d743753f010a83a3d0f2a51d63876e

query I rowsort label-1100-3
SELECT * FROM view_3_tab3_608
----
62 values hashing to 66d743753f010a83a3d0f2a51d63876e

query I rowsort label-1100-3
SELECT pk FROM tab3 WHERE col0 <= 627
----
62 values hashing to 66d743753f010a83a3d0f2a51d63876e

statement ok
DROP VIEW view_1_tab3_608

statement ok
DROP VIEW view_2_tab3_608

statement ok
DROP VIEW view_3_tab3_608

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_608 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 627

statement ok
CREATE VIEW view_2_tab4_608 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 627)

statement ok
CREATE VIEW view_3_tab4_608 AS SELECT pk FROM view_1_tab4_608

query II rowsort label-1100-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 627
----
124 values hashing to cf728b3059bdaf8c6a98568df85a7918

query II rowsort label-1100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 627)
----
76 values hashing to 37ea72d1b5d5f514197588b9b8f4c72e

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab4_608
----
124 values hashing to cf728b3059bdaf8c6a98568df85a7918

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab4_608
----
76 values hashing to 37ea72d1b5d5f514197588b9b8f4c72e

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 627 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 627)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_608 UNION ALL SELECT pk, col0 FROM view_2_tab4_608
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 627 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 627)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_608 UNION SELECT pk, col0 FROM view_2_tab4_608
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 627 ) AS tab4_608
----
62 values hashing to 66d743753f010a83a3d0f2a51d63876e

query I rowsort label-1100-3
SELECT * FROM view_3_tab4_608
----
62 values hashing to 66d743753f010a83a3d0f2a51d63876e

query I rowsort label-1100-3
SELECT pk FROM tab4 WHERE col0 <= 627
----
62 values hashing to 66d743753f010a83a3d0f2a51d63876e

statement ok
DROP VIEW view_1_tab4_608

statement ok
DROP VIEW view_2_tab4_608

statement ok
DROP VIEW view_3_tab4_608

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_609 AS SELECT pk, col0 FROM tab0 WHERE col1 IN (273.6)

statement ok
CREATE VIEW view_2_tab0_609 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 IN (273.6))

statement ok
CREATE VIEW view_3_tab0_609 AS SELECT pk FROM view_1_tab0_609

query II rowsort label-1200-1
SELECT pk, col0 FROM tab0 WHERE col1 IN (273.6)
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 IN (273.6))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab0_609
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab0_609
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 IN (273.6) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 IN (273.6))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_609 UNION ALL SELECT pk, col0 FROM view_2_tab0_609
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 IN (273.6) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 IN (273.6))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_609 UNION SELECT pk, col0 FROM view_2_tab0_609
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 IN (273.6) ) AS tab0_609
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab0_609
----

query I rowsort label-1200-3
SELECT pk FROM tab0 WHERE col1 IN (273.6)
----

statement ok
DROP VIEW view_1_tab0_609

statement ok
DROP VIEW view_2_tab0_609

statement ok
DROP VIEW view_3_tab0_609

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_609 AS SELECT pk, col0 FROM tab1 WHERE col1 IN (273.6)

statement ok
CREATE VIEW view_2_tab1_609 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 IN (273.6))

statement ok
CREATE VIEW view_3_tab1_609 AS SELECT pk FROM view_1_tab1_609

query II rowsort label-1200-1
SELECT pk, col0 FROM tab1 WHERE col1 IN (273.6)
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 IN (273.6))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab1_609
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab1_609
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 IN (273.6) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 IN (273.6))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_609 UNION ALL SELECT pk, col0 FROM view_2_tab1_609
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 IN (273.6) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 IN (273.6))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_609 UNION SELECT pk, col0 FROM view_2_tab1_609
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 IN (273.6) ) AS tab1_609
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab1_609
----

query I rowsort label-1200-3
SELECT pk FROM tab1 WHERE col1 IN (273.6)
----

statement ok
DROP VIEW view_1_tab1_609

statement ok
DROP VIEW view_2_tab1_609

statement ok
DROP VIEW view_3_tab1_609

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_609 AS SELECT pk, col0 FROM tab2 WHERE col1 IN (273.6)

statement ok
CREATE VIEW view_2_tab2_609 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 IN (273.6))

statement ok
CREATE VIEW view_3_tab2_609 AS SELECT pk FROM view_1_tab2_609

query II rowsort label-1200-1
SELECT pk, col0 FROM tab2 WHERE col1 IN (273.6)
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 IN (273.6))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab2_609
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab2_609
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 IN (273.6) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 IN (273.6))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_609 UNION ALL SELECT pk, col0 FROM view_2_tab2_609
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 IN (273.6) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 IN (273.6))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_609 UNION SELECT pk, col0 FROM view_2_tab2_609
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 IN (273.6) ) AS tab2_609
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab2_609
----

query I rowsort label-1200-3
SELECT pk FROM tab2 WHERE col1 IN (273.6)
----

statement ok
DROP VIEW view_1_tab2_609

statement ok
DROP VIEW view_2_tab2_609

statement ok
DROP VIEW view_3_tab2_609

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_609 AS SELECT pk, col0 FROM tab3 WHERE col1 IN (273.6)

statement ok
CREATE VIEW view_2_tab3_609 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 IN (273.6))

statement ok
CREATE VIEW view_3_tab3_609 AS SELECT pk FROM view_1_tab3_609

query II rowsort label-1200-1
SELECT pk, col0 FROM tab3 WHERE col1 IN (273.6)
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 IN (273.6))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab3_609
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab3_609
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 IN (273.6) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 IN (273.6))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_609 UNION ALL SELECT pk, col0 FROM view_2_tab3_609
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 IN (273.6) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 IN (273.6))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_609 UNION SELECT pk, col0 FROM view_2_tab3_609
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 IN (273.6) ) AS tab3_609
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab3_609
----

query I rowsort label-1200-3
SELECT pk FROM tab3 WHERE col1 IN (273.6)
----

statement ok
DROP VIEW view_1_tab3_609

statement ok
DROP VIEW view_2_tab3_609

statement ok
DROP VIEW view_3_tab3_609

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_609 AS SELECT pk, col0 FROM tab4 WHERE col1 IN (273.6)

statement ok
CREATE VIEW view_2_tab4_609 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 IN (273.6))

statement ok
CREATE VIEW view_3_tab4_609 AS SELECT pk FROM view_1_tab4_609

query II rowsort label-1200-1
SELECT pk, col0 FROM tab4 WHERE col1 IN (273.6)
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 IN (273.6))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab4_609
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab4_609
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 IN (273.6) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 IN (273.6))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_609 UNION ALL SELECT pk, col0 FROM view_2_tab4_609
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 IN (273.6) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 IN (273.6))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_609 UNION SELECT pk, col0 FROM view_2_tab4_609
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 IN (273.6) ) AS tab4_609
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab4_609
----

query I rowsort label-1200-3
SELECT pk FROM tab4 WHERE col1 IN (273.6)
----

statement ok
DROP VIEW view_1_tab4_609

statement ok
DROP VIEW view_2_tab4_609

statement ok
DROP VIEW view_3_tab4_609

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_610 AS SELECT pk, col0 FROM tab0 WHERE col3 < 955

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

statement ok
CREATE VIEW view_3_tab0_610 AS SELECT pk FROM view_1_tab0_610

query II rowsort label-1300-1
SELECT pk, col0 FROM tab0 WHERE col3 < 955
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-1300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 955)
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab0_610
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab0_610
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 955 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 955)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_610 UNION ALL SELECT pk, col0 FROM view_2_tab0_610
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 955 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 955)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_610 UNION SELECT pk, col0 FROM view_2_tab0_610
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 < 955 ) AS tab0_610
----
94 values hashing to fdc318f00544da5864f1bc66efb6e125

query I rowsort label-1300-3
SELECT * FROM view_3_tab0_610
----
94 values hashing to fdc318f00544da5864f1bc66efb6e125

query I rowsort label-1300-3
SELECT pk FROM tab0 WHERE col3 < 955
----
94 values hashing to fdc318f00544da5864f1bc66efb6e125

statement ok
DROP VIEW view_1_tab0_610

statement ok
DROP VIEW view_2_tab0_610

statement ok
DROP VIEW view_3_tab0_610

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_610 AS SELECT pk, col0 FROM tab1 WHERE col3 < 955

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

statement ok
CREATE VIEW view_3_tab1_610 AS SELECT pk FROM view_1_tab1_610

query II rowsort label-1300-1
SELECT pk, col0 FROM tab1 WHERE col3 < 955
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-1300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 955)
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab1_610
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab1_610
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 955 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 955)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_610 UNION ALL SELECT pk, col0 FROM view_2_tab1_610
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 955 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 955)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_610 UNION SELECT pk, col0 FROM view_2_tab1_610
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 < 955 ) AS tab1_610
----
94 values hashing to fdc318f00544da5864f1bc66efb6e125

query I rowsort label-1300-3
SELECT * FROM view_3_tab1_610
----
94 values hashing to fdc318f00544da5864f1bc66efb6e125

query I rowsort label-1300-3
SELECT pk FROM tab1 WHERE col3 < 955
----
94 values hashing to fdc318f00544da5864f1bc66efb6e125

statement ok
DROP VIEW view_1_tab1_610

statement ok
DROP VIEW view_2_tab1_610

statement ok
DROP VIEW view_3_tab1_610

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_610 AS SELECT pk, col0 FROM tab2 WHERE col3 < 955

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

statement ok
CREATE VIEW view_3_tab2_610 AS SELECT pk FROM view_1_tab2_610

query II rowsort label-1300-1
SELECT pk, col0 FROM tab2 WHERE col3 < 955
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-1300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 955)
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab2_610
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab2_610
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 955 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 955)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_610 UNION ALL SELECT pk, col0 FROM view_2_tab2_610
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 955 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 955)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_610 UNION SELECT pk, col0 FROM view_2_tab2_610
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 < 955 ) AS tab2_610
----
94 values hashing to fdc318f00544da5864f1bc66efb6e125

query I rowsort label-1300-3
SELECT * FROM view_3_tab2_610
----
94 values hashing to fdc318f00544da5864f1bc66efb6e125

query I rowsort label-1300-3
SELECT pk FROM tab2 WHERE col3 < 955
----
94 values hashing to fdc318f00544da5864f1bc66efb6e125

statement ok
DROP VIEW view_1_tab2_610

statement ok
DROP VIEW view_2_tab2_610

statement ok
DROP VIEW view_3_tab2_610

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_610 AS SELECT pk, col0 FROM tab3 WHERE col3 < 955

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

statement ok
CREATE VIEW view_3_tab3_610 AS SELECT pk FROM view_1_tab3_610

query II rowsort label-1300-1
SELECT pk, col0 FROM tab3 WHERE col3 < 955
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-1300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 955)
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab3_610
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab3_610
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 955 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 955)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_610 UNION ALL SELECT pk, col0 FROM view_2_tab3_610
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 955 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 955)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_610 UNION SELECT pk, col0 FROM view_2_tab3_610
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 < 955 ) AS tab3_610
----
94 values hashing to fdc318f00544da5864f1bc66efb6e125

query I rowsort label-1300-3
SELECT * FROM view_3_tab3_610
----
94 values hashing to fdc318f00544da5864f1bc66efb6e125

query I rowsort label-1300-3
SELECT pk FROM tab3 WHERE col3 < 955
----
94 values hashing to fdc318f00544da5864f1bc66efb6e125

statement ok
DROP VIEW view_1_tab3_610

statement ok
DROP VIEW view_2_tab3_610

statement ok
DROP VIEW view_3_tab3_610

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_610 AS SELECT pk, col0 FROM tab4 WHERE col3 < 955

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

statement ok
CREATE VIEW view_3_tab4_610 AS SELECT pk FROM view_1_tab4_610

query II rowsort label-1300-1
SELECT pk, col0 FROM tab4 WHERE col3 < 955
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-1300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 955)
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab4_610
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab4_610
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 955 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 955)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_610 UNION ALL SELECT pk, col0 FROM view_2_tab4_610
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 955 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 955)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_610 UNION SELECT pk, col0 FROM view_2_tab4_610
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 < 955 ) AS tab4_610
----
94 values hashing to fdc318f00544da5864f1bc66efb6e125

query I rowsort label-1300-3
SELECT * FROM view_3_tab4_610
----
94 values hashing to fdc318f00544da5864f1bc66efb6e125

query I rowsort label-1300-3
SELECT pk FROM tab4 WHERE col3 < 955
----
94 values hashing to fdc318f00544da5864f1bc66efb6e125

statement ok
DROP VIEW view_1_tab4_610

statement ok
DROP VIEW view_2_tab4_610

statement ok
DROP VIEW view_3_tab4_610

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_611 AS SELECT pk, col0 FROM tab0 WHERE col0 > 873

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

statement ok
CREATE VIEW view_3_tab0_611 AS SELECT pk FROM view_1_tab0_611

query II rowsort label-1400-1
SELECT pk, col0 FROM tab0 WHERE col0 > 873
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-1400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 873)
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab0_611
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab0_611
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_611 UNION ALL SELECT pk, col0 FROM view_2_tab0_611
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_611 UNION SELECT pk, col0 FROM view_2_tab0_611
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 873 ) AS tab0_611
----
12 values hashing to a022a4af1f904a42b195f1c174cced90

query I rowsort label-1400-3
SELECT * FROM view_3_tab0_611
----
12 values hashing to a022a4af1f904a42b195f1c174cced90

query I rowsort label-1400-3
SELECT pk FROM tab0 WHERE col0 > 873
----
12 values hashing to a022a4af1f904a42b195f1c174cced90

statement ok
DROP VIEW view_1_tab0_611

statement ok
DROP VIEW view_2_tab0_611

statement ok
DROP VIEW view_3_tab0_611

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_611 AS SELECT pk, col0 FROM tab1 WHERE col0 > 873

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

statement ok
CREATE VIEW view_3_tab1_611 AS SELECT pk FROM view_1_tab1_611

query II rowsort label-1400-1
SELECT pk, col0 FROM tab1 WHERE col0 > 873
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-1400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 873)
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab1_611
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab1_611
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_611 UNION ALL SELECT pk, col0 FROM view_2_tab1_611
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_611 UNION SELECT pk, col0 FROM view_2_tab1_611
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 873 ) AS tab1_611
----
12 values hashing to a022a4af1f904a42b195f1c174cced90

query I rowsort label-1400-3
SELECT * FROM view_3_tab1_611
----
12 values hashing to a022a4af1f904a42b195f1c174cced90

query I rowsort label-1400-3
SELECT pk FROM tab1 WHERE col0 > 873
----
12 values hashing to a022a4af1f904a42b195f1c174cced90

statement ok
DROP VIEW view_1_tab1_611

statement ok
DROP VIEW view_2_tab1_611

statement ok
DROP VIEW view_3_tab1_611

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_611 AS SELECT pk, col0 FROM tab2 WHERE col0 > 873

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

statement ok
CREATE VIEW view_3_tab2_611 AS SELECT pk FROM view_1_tab2_611

query II rowsort label-1400-1
SELECT pk, col0 FROM tab2 WHERE col0 > 873
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-1400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 873)
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab2_611
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab2_611
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_611 UNION ALL SELECT pk, col0 FROM view_2_tab2_611
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_611 UNION SELECT pk, col0 FROM view_2_tab2_611
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 873 ) AS tab2_611
----
12 values hashing to a022a4af1f904a42b195f1c174cced90

query I rowsort label-1400-3
SELECT * FROM view_3_tab2_611
----
12 values hashing to a022a4af1f904a42b195f1c174cced90

query I rowsort label-1400-3
SELECT pk FROM tab2 WHERE col0 > 873
----
12 values hashing to a022a4af1f904a42b195f1c174cced90

statement ok
DROP VIEW view_1_tab2_611

statement ok
DROP VIEW view_2_tab2_611

statement ok
DROP VIEW view_3_tab2_611

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_611 AS SELECT pk, col0 FROM tab3 WHERE col0 > 873

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

statement ok
CREATE VIEW view_3_tab3_611 AS SELECT pk FROM view_1_tab3_611

query II rowsort label-1400-1
SELECT pk, col0 FROM tab3 WHERE col0 > 873
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-1400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 873)
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab3_611
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab3_611
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_611 UNION ALL SELECT pk, col0 FROM view_2_tab3_611
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_611 UNION SELECT pk, col0 FROM view_2_tab3_611
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 873 ) AS tab3_611
----
12 values hashing to a022a4af1f904a42b195f1c174cced90

query I rowsort label-1400-3
SELECT * FROM view_3_tab3_611
----
12 values hashing to a022a4af1f904a42b195f1c174cced90

query I rowsort label-1400-3
SELECT pk FROM tab3 WHERE col0 > 873
----
12 values hashing to a022a4af1f904a42b195f1c174cced90

statement ok
DROP VIEW view_1_tab3_611

statement ok
DROP VIEW view_2_tab3_611

statement ok
DROP VIEW view_3_tab3_611

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_611 AS SELECT pk, col0 FROM tab4 WHERE col0 > 873

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

statement ok
CREATE VIEW view_3_tab4_611 AS SELECT pk FROM view_1_tab4_611

query II rowsort label-1400-1
SELECT pk, col0 FROM tab4 WHERE col0 > 873
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-1400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 873)
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab4_611
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab4_611
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_611 UNION ALL SELECT pk, col0 FROM view_2_tab4_611
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_611 UNION SELECT pk, col0 FROM view_2_tab4_611
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 873 ) AS tab4_611
----
12 values hashing to a022a4af1f904a42b195f1c174cced90

query I rowsort label-1400-3
SELECT * FROM view_3_tab4_611
----
12 values hashing to a022a4af1f904a42b195f1c174cced90

query I rowsort label-1400-3
SELECT pk FROM tab4 WHERE col0 > 873
----
12 values hashing to a022a4af1f904a42b195f1c174cced90

statement ok
DROP VIEW view_1_tab4_611

statement ok
DROP VIEW view_2_tab4_611

statement ok
DROP VIEW view_3_tab4_611

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_612 AS SELECT pk, col0 FROM tab0 WHERE (col3 = 840)

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

statement ok
CREATE VIEW view_3_tab0_612 AS SELECT pk FROM view_1_tab0_612

query II rowsort label-1500-1
SELECT pk, col0 FROM tab0 WHERE (col3 = 840)
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 840))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab0_612
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab0_612
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_612 UNION ALL SELECT pk, col0 FROM view_2_tab0_612
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 = 840) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 840))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_612 UNION SELECT pk, col0 FROM view_2_tab0_612
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 = 840) ) AS tab0_612
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab0_612
----

query I rowsort label-1500-3
SELECT pk FROM tab0 WHERE (col3 = 840)
----

statement ok
DROP VIEW view_1_tab0_612

statement ok
DROP VIEW view_2_tab0_612

statement ok
DROP VIEW view_3_tab0_612

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_612 AS SELECT pk, col0 FROM tab1 WHERE (col3 = 840)

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

statement ok
CREATE VIEW view_3_tab1_612 AS SELECT pk FROM view_1_tab1_612

query II rowsort label-1500-1
SELECT pk, col0 FROM tab1 WHERE (col3 = 840)
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 840))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab1_612
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab1_612
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 = 840) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 840))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_612 UNION ALL SELECT pk, col0 FROM view_2_tab1_612
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 = 840) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 840))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_612 UNION SELECT pk, col0 FROM view_2_tab1_612
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 = 840) ) AS tab1_612
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab1_612
----

query I rowsort label-1500-3
SELECT pk FROM tab1 WHERE (col3 = 840)
----

statement ok
DROP VIEW view_1_tab1_612

statement ok
DROP VIEW view_2_tab1_612

statement ok
DROP VIEW view_3_tab1_612

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_612 AS SELECT pk, col0 FROM tab2 WHERE (col3 = 840)

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

statement ok
CREATE VIEW view_3_tab2_612 AS SELECT pk FROM view_1_tab2_612

query II rowsort label-1500-1
SELECT pk, col0 FROM tab2 WHERE (col3 = 840)
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 840))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab2_612
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab2_612
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 = 840) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 840))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_612 UNION ALL SELECT pk, col0 FROM view_2_tab2_612
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 = 840) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 840))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_612 UNION SELECT pk, col0 FROM view_2_tab2_612
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 = 840) ) AS tab2_612
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab2_612
----

query I rowsort label-1500-3
SELECT pk FROM tab2 WHERE (col3 = 840)
----

statement ok
DROP VIEW view_1_tab2_612

statement ok
DROP VIEW view_2_tab2_612

statement ok
DROP VIEW view_3_tab2_612

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_612 AS SELECT pk, col0 FROM tab3 WHERE (col3 = 840)

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

statement ok
CREATE VIEW view_3_tab3_612 AS SELECT pk FROM view_1_tab3_612

query II rowsort label-1500-1
SELECT pk, col0 FROM tab3 WHERE (col3 = 840)
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 840))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab3_612
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab3_612
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 = 840) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 840))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_612 UNION ALL SELECT pk, col0 FROM view_2_tab3_612
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 = 840) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 840))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_612 UNION SELECT pk, col0 FROM view_2_tab3_612
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 = 840) ) AS tab3_612
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab3_612
----

query I rowsort label-1500-3
SELECT pk FROM tab3 WHERE (col3 = 840)
----

statement ok
DROP VIEW view_1_tab3_612

statement ok
DROP VIEW view_2_tab3_612

statement ok
DROP VIEW view_3_tab3_612

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_612 AS SELECT pk, col0 FROM tab4 WHERE (col3 = 840)

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

statement ok
CREATE VIEW view_3_tab4_612 AS SELECT pk FROM view_1_tab4_612

query II rowsort label-1500-1
SELECT pk, col0 FROM tab4 WHERE (col3 = 840)
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 840))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab4_612
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab4_612
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 = 840) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 840))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_612 UNION ALL SELECT pk, col0 FROM view_2_tab4_612
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 = 840) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 840))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_612 UNION SELECT pk, col0 FROM view_2_tab4_612
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 = 840) ) AS tab4_612
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab4_612
----

query I rowsort label-1500-3
SELECT pk FROM tab4 WHERE (col3 = 840)
----

statement ok
DROP VIEW view_1_tab4_612

statement ok
DROP VIEW view_2_tab4_612

statement ok
DROP VIEW view_3_tab4_612

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_613 AS SELECT pk, col0 FROM tab0 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868)

statement ok
CREATE VIEW view_2_tab0_613 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))

statement ok
CREATE VIEW view_3_tab0_613 AS SELECT pk FROM view_1_tab0_613

query II rowsort label-1600-1
SELECT pk, col0 FROM tab0 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868)
----
58 values hashing to b6a90316c0a87c7347dbdc23783ac9ac

query II rowsort label-1600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))
----
142 values hashing to dc3c629dde0313949bf66330df1018d1

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab0_613
----
58 values hashing to b6a90316c0a87c7347dbdc23783ac9ac

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab0_613
----
142 values hashing to dc3c629dde0313949bf66330df1018d1

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_613 UNION ALL SELECT pk, col0 FROM view_2_tab0_613
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_613 UNION SELECT pk, col0 FROM view_2_tab0_613
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868) ) AS tab0_613
----
29 values hashing to 8216f7e4c76fd951786e286239a8736a

query I rowsort label-1600-3
SELECT * FROM view_3_tab0_613
----
29 values hashing to 8216f7e4c76fd951786e286239a8736a

query I rowsort label-1600-3
SELECT pk FROM tab0 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868)
----
29 values hashing to 8216f7e4c76fd951786e286239a8736a

statement ok
DROP VIEW view_1_tab0_613

statement ok
DROP VIEW view_2_tab0_613

statement ok
DROP VIEW view_3_tab0_613

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_613 AS SELECT pk, col0 FROM tab1 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868)

statement ok
CREATE VIEW view_2_tab1_613 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))

statement ok
CREATE VIEW view_3_tab1_613 AS SELECT pk FROM view_1_tab1_613

query II rowsort label-1600-1
SELECT pk, col0 FROM tab1 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868)
----
58 values hashing to b6a90316c0a87c7347dbdc23783ac9ac

query II rowsort label-1600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))
----
142 values hashing to dc3c629dde0313949bf66330df1018d1

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab1_613
----
58 values hashing to b6a90316c0a87c7347dbdc23783ac9ac

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab1_613
----
142 values hashing to dc3c629dde0313949bf66330df1018d1

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_613 UNION ALL SELECT pk, col0 FROM view_2_tab1_613
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_613 UNION SELECT pk, col0 FROM view_2_tab1_613
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868) ) AS tab1_613
----
29 values hashing to 8216f7e4c76fd951786e286239a8736a

query I rowsort label-1600-3
SELECT * FROM view_3_tab1_613
----
29 values hashing to 8216f7e4c76fd951786e286239a8736a

query I rowsort label-1600-3
SELECT pk FROM tab1 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868)
----
29 values hashing to 8216f7e4c76fd951786e286239a8736a

statement ok
DROP VIEW view_1_tab1_613

statement ok
DROP VIEW view_2_tab1_613

statement ok
DROP VIEW view_3_tab1_613

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_613 AS SELECT pk, col0 FROM tab2 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868)

statement ok
CREATE VIEW view_2_tab2_613 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))

statement ok
CREATE VIEW view_3_tab2_613 AS SELECT pk FROM view_1_tab2_613

query II rowsort label-1600-1
SELECT pk, col0 FROM tab2 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868)
----
58 values hashing to b6a90316c0a87c7347dbdc23783ac9ac

query II rowsort label-1600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))
----
142 values hashing to dc3c629dde0313949bf66330df1018d1

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab2_613
----
58 values hashing to b6a90316c0a87c7347dbdc23783ac9ac

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab2_613
----
142 values hashing to dc3c629dde0313949bf66330df1018d1

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_613 UNION ALL SELECT pk, col0 FROM view_2_tab2_613
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_613 UNION SELECT pk, col0 FROM view_2_tab2_613
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868) ) AS tab2_613
----
29 values hashing to 8216f7e4c76fd951786e286239a8736a

query I rowsort label-1600-3
SELECT * FROM view_3_tab2_613
----
29 values hashing to 8216f7e4c76fd951786e286239a8736a

query I rowsort label-1600-3
SELECT pk FROM tab2 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868)
----
29 values hashing to 8216f7e4c76fd951786e286239a8736a

statement ok
DROP VIEW view_1_tab2_613

statement ok
DROP VIEW view_2_tab2_613

statement ok
DROP VIEW view_3_tab2_613

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_613 AS SELECT pk, col0 FROM tab3 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868)

statement ok
CREATE VIEW view_2_tab3_613 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))

statement ok
CREATE VIEW view_3_tab3_613 AS SELECT pk FROM view_1_tab3_613

query II rowsort label-1600-1
SELECT pk, col0 FROM tab3 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868)
----
58 values hashing to b6a90316c0a87c7347dbdc23783ac9ac

query II rowsort label-1600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))
----
142 values hashing to dc3c629dde0313949bf66330df1018d1

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab3_613
----
58 values hashing to b6a90316c0a87c7347dbdc23783ac9ac

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab3_613
----
142 values hashing to dc3c629dde0313949bf66330df1018d1

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_613 UNION ALL SELECT pk, col0 FROM view_2_tab3_613
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_613 UNION SELECT pk, col0 FROM view_2_tab3_613
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868) ) AS tab3_613
----
29 values hashing to 8216f7e4c76fd951786e286239a8736a

query I rowsort label-1600-3
SELECT * FROM view_3_tab3_613
----
29 values hashing to 8216f7e4c76fd951786e286239a8736a

query I rowsort label-1600-3
SELECT pk FROM tab3 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868)
----
29 values hashing to 8216f7e4c76fd951786e286239a8736a

statement ok
DROP VIEW view_1_tab3_613

statement ok
DROP VIEW view_2_tab3_613

statement ok
DROP VIEW view_3_tab3_613

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_613 AS SELECT pk, col0 FROM tab4 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868)

statement ok
CREATE VIEW view_2_tab4_613 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))

statement ok
CREATE VIEW view_3_tab4_613 AS SELECT pk FROM view_1_tab4_613

query II rowsort label-1600-1
SELECT pk, col0 FROM tab4 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868)
----
58 values hashing to b6a90316c0a87c7347dbdc23783ac9ac

query II rowsort label-1600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))
----
142 values hashing to dc3c629dde0313949bf66330df1018d1

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab4_613
----
58 values hashing to b6a90316c0a87c7347dbdc23783ac9ac

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab4_613
----
142 values hashing to dc3c629dde0313949bf66330df1018d1

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_613 UNION ALL SELECT pk, col0 FROM view_2_tab4_613
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_613 UNION SELECT pk, col0 FROM view_2_tab4_613
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868) ) AS tab4_613
----
29 values hashing to 8216f7e4c76fd951786e286239a8736a

query I rowsort label-1600-3
SELECT * FROM view_3_tab4_613
----
29 values hashing to 8216f7e4c76fd951786e286239a8736a

query I rowsort label-1600-3
SELECT pk FROM tab4 WHERE (col3 > 677 AND (col3 < 952) OR col0 = 444 AND col0 >= 499 OR col0 > 868)
----
29 values hashing to 8216f7e4c76fd951786e286239a8736a

statement ok
DROP VIEW view_1_tab4_613

statement ok
DROP VIEW view_2_tab4_613

statement ok
DROP VIEW view_3_tab4_613

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_614 AS SELECT pk, col0 FROM tab0 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285

statement ok
CREATE VIEW view_2_tab0_614 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)

statement ok
CREATE VIEW view_3_tab0_614 AS SELECT pk FROM view_1_tab0_614

query II rowsort label-1700-1
SELECT pk, col0 FROM tab0 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285
----

query II rowsort label-1700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab0_614
----

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab0_614
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_614 UNION ALL SELECT pk, col0 FROM view_2_tab0_614
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_614 UNION SELECT pk, col0 FROM view_2_tab0_614
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285 ) AS tab0_614
----

query I rowsort label-1700-3
SELECT * FROM view_3_tab0_614
----

query I rowsort label-1700-3
SELECT pk FROM tab0 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285
----

statement ok
DROP VIEW view_1_tab0_614

statement ok
DROP VIEW view_2_tab0_614

statement ok
DROP VIEW view_3_tab0_614

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_614 AS SELECT pk, col0 FROM tab1 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285

statement ok
CREATE VIEW view_2_tab1_614 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)

statement ok
CREATE VIEW view_3_tab1_614 AS SELECT pk FROM view_1_tab1_614

query II rowsort label-1700-1
SELECT pk, col0 FROM tab1 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285
----

query II rowsort label-1700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab1_614
----

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab1_614
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_614 UNION ALL SELECT pk, col0 FROM view_2_tab1_614
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_614 UNION SELECT pk, col0 FROM view_2_tab1_614
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285 ) AS tab1_614
----

query I rowsort label-1700-3
SELECT * FROM view_3_tab1_614
----

query I rowsort label-1700-3
SELECT pk FROM tab1 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285
----

statement ok
DROP VIEW view_1_tab1_614

statement ok
DROP VIEW view_2_tab1_614

statement ok
DROP VIEW view_3_tab1_614

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_614 AS SELECT pk, col0 FROM tab2 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285

statement ok
CREATE VIEW view_2_tab2_614 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)

statement ok
CREATE VIEW view_3_tab2_614 AS SELECT pk FROM view_1_tab2_614

query II rowsort label-1700-1
SELECT pk, col0 FROM tab2 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285
----

query II rowsort label-1700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab2_614
----

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab2_614
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_614 UNION ALL SELECT pk, col0 FROM view_2_tab2_614
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_614 UNION SELECT pk, col0 FROM view_2_tab2_614
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285 ) AS tab2_614
----

query I rowsort label-1700-3
SELECT * FROM view_3_tab2_614
----

query I rowsort label-1700-3
SELECT pk FROM tab2 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285
----

statement ok
DROP VIEW view_1_tab2_614

statement ok
DROP VIEW view_2_tab2_614

statement ok
DROP VIEW view_3_tab2_614

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_614 AS SELECT pk, col0 FROM tab3 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285

statement ok
CREATE VIEW view_2_tab3_614 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)

statement ok
CREATE VIEW view_3_tab3_614 AS SELECT pk FROM view_1_tab3_614

query II rowsort label-1700-1
SELECT pk, col0 FROM tab3 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285
----

query II rowsort label-1700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab3_614
----

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab3_614
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_614 UNION ALL SELECT pk, col0 FROM view_2_tab3_614
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_614 UNION SELECT pk, col0 FROM view_2_tab3_614
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285 ) AS tab3_614
----

query I rowsort label-1700-3
SELECT * FROM view_3_tab3_614
----

query I rowsort label-1700-3
SELECT pk FROM tab3 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285
----

statement ok
DROP VIEW view_1_tab3_614

statement ok
DROP VIEW view_2_tab3_614

statement ok
DROP VIEW view_3_tab3_614

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_614 AS SELECT pk, col0 FROM tab4 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285

statement ok
CREATE VIEW view_2_tab4_614 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)

statement ok
CREATE VIEW view_3_tab4_614 AS SELECT pk FROM view_1_tab4_614

query II rowsort label-1700-1
SELECT pk, col0 FROM tab4 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285
----

query II rowsort label-1700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab4_614
----

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab4_614
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_614 UNION ALL SELECT pk, col0 FROM view_2_tab4_614
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_614 UNION SELECT pk, col0 FROM view_2_tab4_614
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285 ) AS tab4_614
----

query I rowsort label-1700-3
SELECT * FROM view_3_tab4_614
----

query I rowsort label-1700-3
SELECT pk FROM tab4 WHERE col4 IS NULL AND (col0 IS NULL OR col3 = 271) AND col0 > 285
----

statement ok
DROP VIEW view_1_tab4_614

statement ok
DROP VIEW view_2_tab4_614

statement ok
DROP VIEW view_3_tab4_614

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_615 AS SELECT pk, col0 FROM tab0 WHERE col0 > 186

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

statement ok
CREATE VIEW view_3_tab0_615 AS SELECT pk FROM view_1_tab0_615

query II rowsort label-1800-1
SELECT pk, col0 FROM tab0 WHERE col0 > 186
----
154 values hashing to d8a6f9fad3f999b19a8568501883d468

query II rowsort label-1800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 186)
----
46 values hashing to 15ccf0f14958ce2e245dd2709d5496c8

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab0_615
----
154 values hashing to d8a6f9fad3f999b19a8568501883d468

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab0_615
----
46 values hashing to 15ccf0f14958ce2e245dd2709d5496c8

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_615 UNION ALL SELECT pk, col0 FROM view_2_tab0_615
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_615 UNION SELECT pk, col0 FROM view_2_tab0_615
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 186 ) AS tab0_615
----
77 values hashing to 06d54a6df2d6563364c89b53594728ac

query I rowsort label-1800-3
SELECT * FROM view_3_tab0_615
----
77 values hashing to 06d54a6df2d6563364c89b53594728ac

query I rowsort label-1800-3
SELECT pk FROM tab0 WHERE col0 > 186
----
77 values hashing to 06d54a6df2d6563364c89b53594728ac

statement ok
DROP VIEW view_1_tab0_615

statement ok
DROP VIEW view_2_tab0_615

statement ok
DROP VIEW view_3_tab0_615

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_615 AS SELECT pk, col0 FROM tab1 WHERE col0 > 186

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

statement ok
CREATE VIEW view_3_tab1_615 AS SELECT pk FROM view_1_tab1_615

query II rowsort label-1800-1
SELECT pk, col0 FROM tab1 WHERE col0 > 186
----
154 values hashing to d8a6f9fad3f999b19a8568501883d468

query II rowsort label-1800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 186)
----
46 values hashing to 15ccf0f14958ce2e245dd2709d5496c8

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab1_615
----
154 values hashing to d8a6f9fad3f999b19a8568501883d468

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab1_615
----
46 values hashing to 15ccf0f14958ce2e245dd2709d5496c8

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_615 UNION ALL SELECT pk, col0 FROM view_2_tab1_615
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_615 UNION SELECT pk, col0 FROM view_2_tab1_615
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 186 ) AS tab1_615
----
77 values hashing to 06d54a6df2d6563364c89b53594728ac

query I rowsort label-1800-3
SELECT * FROM view_3_tab1_615
----
77 values hashing to 06d54a6df2d6563364c89b53594728ac

query I rowsort label-1800-3
SELECT pk FROM tab1 WHERE col0 > 186
----
77 values hashing to 06d54a6df2d6563364c89b53594728ac

statement ok
DROP VIEW view_1_tab1_615

statement ok
DROP VIEW view_2_tab1_615

statement ok
DROP VIEW view_3_tab1_615

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_615 AS SELECT pk, col0 FROM tab2 WHERE col0 > 186

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

statement ok
CREATE VIEW view_3_tab2_615 AS SELECT pk FROM view_1_tab2_615

query II rowsort label-1800-1
SELECT pk, col0 FROM tab2 WHERE col0 > 186
----
154 values hashing to d8a6f9fad3f999b19a8568501883d468

query II rowsort label-1800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 186)
----
46 values hashing to 15ccf0f14958ce2e245dd2709d5496c8

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab2_615
----
154 values hashing to d8a6f9fad3f999b19a8568501883d468

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab2_615
----
46 values hashing to 15ccf0f14958ce2e245dd2709d5496c8

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_615 UNION ALL SELECT pk, col0 FROM view_2_tab2_615
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_615 UNION SELECT pk, col0 FROM view_2_tab2_615
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 186 ) AS tab2_615
----
77 values hashing to 06d54a6df2d6563364c89b53594728ac

query I rowsort label-1800-3
SELECT * FROM view_3_tab2_615
----
77 values hashing to 06d54a6df2d6563364c89b53594728ac

query I rowsort label-1800-3
SELECT pk FROM tab2 WHERE col0 > 186
----
77 values hashing to 06d54a6df2d6563364c89b53594728ac

statement ok
DROP VIEW view_1_tab2_615

statement ok
DROP VIEW view_2_tab2_615

statement ok
DROP VIEW view_3_tab2_615

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_615 AS SELECT pk, col0 FROM tab3 WHERE col0 > 186

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

statement ok
CREATE VIEW view_3_tab3_615 AS SELECT pk FROM view_1_tab3_615

query II rowsort label-1800-1
SELECT pk, col0 FROM tab3 WHERE col0 > 186
----
154 values hashing to d8a6f9fad3f999b19a8568501883d468

query II rowsort label-1800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 186)
----
46 values hashing to 15ccf0f14958ce2e245dd2709d5496c8

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab3_615
----
154 values hashing to d8a6f9fad3f999b19a8568501883d468

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab3_615
----
46 values hashing to 15ccf0f14958ce2e245dd2709d5496c8

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_615 UNION ALL SELECT pk, col0 FROM view_2_tab3_615
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_615 UNION SELECT pk, col0 FROM view_2_tab3_615
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 186 ) AS tab3_615
----
77 values hashing to 06d54a6df2d6563364c89b53594728ac

query I rowsort label-1800-3
SELECT * FROM view_3_tab3_615
----
77 values hashing to 06d54a6df2d6563364c89b53594728ac

query I rowsort label-1800-3
SELECT pk FROM tab3 WHERE col0 > 186
----
77 values hashing to 06d54a6df2d6563364c89b53594728ac

statement ok
DROP VIEW view_1_tab3_615

statement ok
DROP VIEW view_2_tab3_615

statement ok
DROP VIEW view_3_tab3_615

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_615 AS SELECT pk, col0 FROM tab4 WHERE col0 > 186

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

statement ok
CREATE VIEW view_3_tab4_615 AS SELECT pk FROM view_1_tab4_615

query II rowsort label-1800-1
SELECT pk, col0 FROM tab4 WHERE col0 > 186
----
154 values hashing to d8a6f9fad3f999b19a8568501883d468

query II rowsort label-1800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 186)
----
46 values hashing to 15ccf0f14958ce2e245dd2709d5496c8

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab4_615
----
154 values hashing to d8a6f9fad3f999b19a8568501883d468

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab4_615
----
46 values hashing to 15ccf0f14958ce2e245dd2709d5496c8

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_615 UNION ALL SELECT pk, col0 FROM view_2_tab4_615
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_615 UNION SELECT pk, col0 FROM view_2_tab4_615
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 186 ) AS tab4_615
----
77 values hashing to 06d54a6df2d6563364c89b53594728ac

query I rowsort label-1800-3
SELECT * FROM view_3_tab4_615
----
77 values hashing to 06d54a6df2d6563364c89b53594728ac

query I rowsort label-1800-3
SELECT pk FROM tab4 WHERE col0 > 186
----
77 values hashing to 06d54a6df2d6563364c89b53594728ac

statement ok
DROP VIEW view_1_tab4_615

statement ok
DROP VIEW view_2_tab4_615

statement ok
DROP VIEW view_3_tab4_615

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_616 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994

statement ok
CREATE VIEW view_2_tab0_616 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)

statement ok
CREATE VIEW view_3_tab0_616 AS SELECT pk FROM view_1_tab0_616

query II rowsort label-1900-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994
----

query II rowsort label-1900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab0_616
----

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab0_616
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_616 UNION ALL SELECT pk, col0 FROM view_2_tab0_616
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_616 UNION SELECT pk, col0 FROM view_2_tab0_616
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994 ) AS tab0_616
----

query I rowsort label-1900-3
SELECT * FROM view_3_tab0_616
----

query I rowsort label-1900-3
SELECT pk FROM tab0 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994
----

statement ok
DROP VIEW view_1_tab0_616

statement ok
DROP VIEW view_2_tab0_616

statement ok
DROP VIEW view_3_tab0_616

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_616 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994

statement ok
CREATE VIEW view_2_tab1_616 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)

statement ok
CREATE VIEW view_3_tab1_616 AS SELECT pk FROM view_1_tab1_616

query II rowsort label-1900-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994
----

query II rowsort label-1900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab1_616
----

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab1_616
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_616 UNION ALL SELECT pk, col0 FROM view_2_tab1_616
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_616 UNION SELECT pk, col0 FROM view_2_tab1_616
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994 ) AS tab1_616
----

query I rowsort label-1900-3
SELECT * FROM view_3_tab1_616
----

query I rowsort label-1900-3
SELECT pk FROM tab1 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994
----

statement ok
DROP VIEW view_1_tab1_616

statement ok
DROP VIEW view_2_tab1_616

statement ok
DROP VIEW view_3_tab1_616

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_616 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994

statement ok
CREATE VIEW view_2_tab2_616 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)

statement ok
CREATE VIEW view_3_tab2_616 AS SELECT pk FROM view_1_tab2_616

query II rowsort label-1900-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994
----

query II rowsort label-1900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab2_616
----

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab2_616
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_616 UNION ALL SELECT pk, col0 FROM view_2_tab2_616
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_616 UNION SELECT pk, col0 FROM view_2_tab2_616
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994 ) AS tab2_616
----

query I rowsort label-1900-3
SELECT * FROM view_3_tab2_616
----

query I rowsort label-1900-3
SELECT pk FROM tab2 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994
----

statement ok
DROP VIEW view_1_tab2_616

statement ok
DROP VIEW view_2_tab2_616

statement ok
DROP VIEW view_3_tab2_616

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_616 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994

statement ok
CREATE VIEW view_2_tab3_616 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)

statement ok
CREATE VIEW view_3_tab3_616 AS SELECT pk FROM view_1_tab3_616

query II rowsort label-1900-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994
----

query II rowsort label-1900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab3_616
----

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab3_616
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_616 UNION ALL SELECT pk, col0 FROM view_2_tab3_616
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_616 UNION SELECT pk, col0 FROM view_2_tab3_616
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994 ) AS tab3_616
----

query I rowsort label-1900-3
SELECT * FROM view_3_tab3_616
----

query I rowsort label-1900-3
SELECT pk FROM tab3 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994
----

statement ok
DROP VIEW view_1_tab3_616

statement ok
DROP VIEW view_2_tab3_616

statement ok
DROP VIEW view_3_tab3_616

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_616 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994

statement ok
CREATE VIEW view_2_tab4_616 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)

statement ok
CREATE VIEW view_3_tab4_616 AS SELECT pk FROM view_1_tab4_616

query II rowsort label-1900-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994
----

query II rowsort label-1900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab4_616
----

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab4_616
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_616 UNION ALL SELECT pk, col0 FROM view_2_tab4_616
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_616 UNION SELECT pk, col0 FROM view_2_tab4_616
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994 ) AS tab4_616
----

query I rowsort label-1900-3
SELECT * FROM view_3_tab4_616
----

query I rowsort label-1900-3
SELECT pk FROM tab4 WHERE col3 >= 620 AND (col0 > 318 OR ((col1 >= 2.92 AND col0 IN (542) AND (col4 <= 643.86)) OR (col3 <= 840)) OR col3 < 694 AND col1 <= 169.50 AND ((col3 = 54 AND col4 IN (984.57,576.22) AND col0 IS NULL AND ((col1 <= 377.64)) OR col1 > 788.62 OR (col1 <= 560.73 AND col1 < 970.66 AND col0 >= 882) OR (col3 > 153)) OR col3 < 760 OR ((((col3 BETWEEN 225 AND 844 OR (col0 >= 281) AND (col0 > 828) OR col0 > 542) OR col0 > 757))) AND ((col0 >= 258 AND col3 IN (40) AND (col3 > 127) OR col3 IN (157,175,473,557,765) AND (col1 > 105.49))) OR col4 < 40.99)) AND col0 > 994
----

statement ok
DROP VIEW view_1_tab4_616

statement ok
DROP VIEW view_2_tab4_616

statement ok
DROP VIEW view_3_tab4_616

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_617 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab0 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL)))

statement ok
CREATE VIEW view_2_tab0_617 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab0 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))

statement ok
CREATE VIEW view_3_tab0_617 AS SELECT pk FROM view_1_tab0_617

query II rowsort label-2000-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab0 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL)))
----
96 values hashing to 01d73b1adc307b4129fa5c14ab919577

query II rowsort label-2000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab0 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))
----
104 values hashing to 95dd1ba6a954510956ccf898844f7790

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab0_617
----
96 values hashing to 01d73b1adc307b4129fa5c14ab919577

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab0_617
----
104 values hashing to 95dd1ba6a954510956ccf898844f7790

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab0 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab0 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_617 UNION ALL SELECT pk, col0 FROM view_2_tab0_617
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab0 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab0 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_617 UNION SELECT pk, col0 FROM view_2_tab0_617
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab0 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))) ) AS tab0_617
----
48 values hashing to e5dfebfd6b7ef5f4a7a15529ab7ed36f

query I rowsort label-2000-3
SELECT * FROM view_3_tab0_617
----
48 values hashing to e5dfebfd6b7ef5f4a7a15529ab7ed36f

query I rowsort label-2000-3
SELECT pk FROM tab0 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab0 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL)))
----
48 values hashing to e5dfebfd6b7ef5f4a7a15529ab7ed36f

statement ok
DROP VIEW view_1_tab0_617

statement ok
DROP VIEW view_2_tab0_617

statement ok
DROP VIEW view_3_tab0_617

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_617 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab1 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL)))

statement ok
CREATE VIEW view_2_tab1_617 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab1 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))

statement ok
CREATE VIEW view_3_tab1_617 AS SELECT pk FROM view_1_tab1_617

query II rowsort label-2000-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab1 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL)))
----
96 values hashing to 01d73b1adc307b4129fa5c14ab919577

query II rowsort label-2000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab1 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))
----
104 values hashing to 95dd1ba6a954510956ccf898844f7790

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab1_617
----
96 values hashing to 01d73b1adc307b4129fa5c14ab919577

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab1_617
----
104 values hashing to 95dd1ba6a954510956ccf898844f7790

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab1 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab1 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_617 UNION ALL SELECT pk, col0 FROM view_2_tab1_617
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab1 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab1 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_617 UNION SELECT pk, col0 FROM view_2_tab1_617
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab1 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))) ) AS tab1_617
----
48 values hashing to e5dfebfd6b7ef5f4a7a15529ab7ed36f

query I rowsort label-2000-3
SELECT * FROM view_3_tab1_617
----
48 values hashing to e5dfebfd6b7ef5f4a7a15529ab7ed36f

query I rowsort label-2000-3
SELECT pk FROM tab1 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab1 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL)))
----
48 values hashing to e5dfebfd6b7ef5f4a7a15529ab7ed36f

statement ok
DROP VIEW view_1_tab1_617

statement ok
DROP VIEW view_2_tab1_617

statement ok
DROP VIEW view_3_tab1_617

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_617 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab2 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL)))

statement ok
CREATE VIEW view_2_tab2_617 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab2 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))

statement ok
CREATE VIEW view_3_tab2_617 AS SELECT pk FROM view_1_tab2_617

query II rowsort label-2000-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab2 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL)))
----
96 values hashing to 01d73b1adc307b4129fa5c14ab919577

query II rowsort label-2000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab2 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))
----
104 values hashing to 95dd1ba6a954510956ccf898844f7790

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab2_617
----
96 values hashing to 01d73b1adc307b4129fa5c14ab919577

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab2_617
----
104 values hashing to 95dd1ba6a954510956ccf898844f7790

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab2 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab2 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_617 UNION ALL SELECT pk, col0 FROM view_2_tab2_617
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab2 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab2 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_617 UNION SELECT pk, col0 FROM view_2_tab2_617
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab2 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))) ) AS tab2_617
----
48 values hashing to e5dfebfd6b7ef5f4a7a15529ab7ed36f

query I rowsort label-2000-3
SELECT * FROM view_3_tab2_617
----
48 values hashing to e5dfebfd6b7ef5f4a7a15529ab7ed36f

query I rowsort label-2000-3
SELECT pk FROM tab2 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab2 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL)))
----
48 values hashing to e5dfebfd6b7ef5f4a7a15529ab7ed36f

statement ok
DROP VIEW view_1_tab2_617

statement ok
DROP VIEW view_2_tab2_617

statement ok
DROP VIEW view_3_tab2_617

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_617 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab3 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL)))

statement ok
CREATE VIEW view_2_tab3_617 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab3 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))

statement ok
CREATE VIEW view_3_tab3_617 AS SELECT pk FROM view_1_tab3_617

query II rowsort label-2000-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab3 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL)))
----
96 values hashing to 01d73b1adc307b4129fa5c14ab919577

query II rowsort label-2000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab3 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))
----
104 values hashing to 95dd1ba6a954510956ccf898844f7790

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab3_617
----
96 values hashing to 01d73b1adc307b4129fa5c14ab919577

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab3_617
----
104 values hashing to 95dd1ba6a954510956ccf898844f7790

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab3 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab3 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_617 UNION ALL SELECT pk, col0 FROM view_2_tab3_617
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab3 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab3 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_617 UNION SELECT pk, col0 FROM view_2_tab3_617
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab3 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))) ) AS tab3_617
----
48 values hashing to e5dfebfd6b7ef5f4a7a15529ab7ed36f

query I rowsort label-2000-3
SELECT * FROM view_3_tab3_617
----
48 values hashing to e5dfebfd6b7ef5f4a7a15529ab7ed36f

query I rowsort label-2000-3
SELECT pk FROM tab3 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab3 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL)))
----
48 values hashing to e5dfebfd6b7ef5f4a7a15529ab7ed36f

statement ok
DROP VIEW view_1_tab3_617

statement ok
DROP VIEW view_2_tab3_617

statement ok
DROP VIEW view_3_tab3_617

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_617 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab4 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL)))

statement ok
CREATE VIEW view_2_tab4_617 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab4 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))

statement ok
CREATE VIEW view_3_tab4_617 AS SELECT pk FROM view_1_tab4_617

query II rowsort label-2000-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab4 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL)))
----
96 values hashing to 01d73b1adc307b4129fa5c14ab919577

query II rowsort label-2000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab4 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))
----
104 values hashing to 95dd1ba6a954510956ccf898844f7790

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab4_617
----
96 values hashing to 01d73b1adc307b4129fa5c14ab919577

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab4_617
----
104 values hashing to 95dd1ba6a954510956ccf898844f7790

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab4 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab4 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_617 UNION ALL SELECT pk, col0 FROM view_2_tab4_617
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab4 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab4 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_617 UNION SELECT pk, col0 FROM view_2_tab4_617
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab4 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL))) ) AS tab4_617
----
48 values hashing to e5dfebfd6b7ef5f4a7a15529ab7ed36f

query I rowsort label-2000-3
SELECT * FROM view_3_tab4_617
----
48 values hashing to e5dfebfd6b7ef5f4a7a15529ab7ed36f

query I rowsort label-2000-3
SELECT pk FROM tab4 WHERE (col0 < 525 AND (col4 <= 908.4 AND col4 < 957.20 AND col1 IS NULL OR col4 IS NULL OR col0 <= 910 AND ((col0 >= 147 AND col1 IN (277.42,651.41)) OR ((col0 <= 246 AND (col0 >= 776)) AND col1 >= 32.66) OR (col0 < 843) AND col0 >= 141 AND (col3 BETWEEN 878 AND 946) AND col3 < 893 AND col1 > 97.25 AND ((col3 > 340)) AND col3 > 323 OR (col0 <= 261 OR ((((col3 >= 379)) OR (col3 >= 117 AND ((col0 IN (99,815,114,554,699) OR col0 < 644 AND col0 IS NULL)) AND (col3 >= 299) AND ((col0 <= 688) AND col3 >= 467) OR col3 = 987 OR col0 > 92 OR col4 >= 326.58 OR (col3 <= 147) OR col3 <= 901 AND col1 < 400.79 OR (col0 IS NULL AND (((((((((col4 >= 983.72)))) OR (col0 >= 897) OR (col0 IS NULL) OR ((((col0 = 857)))) AND col4 IS NULL OR (col0 > 381) AND (col3 < 738)) AND (col4 < 215.92) OR (col3 < 863) AND col3 <= 880 OR col3 >= 110 AND col3 > 826 OR ((col1 > 248.43 OR col3 > 470 OR col4 IN (17.56,975.93,408.82))) AND col0 IS NULL OR col4 = 681.60 OR (col1 < 742.35)))) OR (col3 < 709 AND (col1 >= 308.51 OR (col4 > 686.71) OR col3 >= 803 OR col0 IN (928,171,384,621,683) AND col0 > 383 AND col1 IN (18.17,234.38,458.2)) OR col0 <= 813 AND (((col1 > 68.45 AND (((col0 IS NULL)))) OR col0 < 481 AND col0 > 545 OR col1 >= 593.17 AND ((col1 > 936.56) OR ((col0 > 524)) AND (col0 > 537 OR (col3 < 267) AND (col3 < 974) OR (col4 > 521.75) AND (col4 BETWEEN 537.11 AND 342.48)) OR (col0 <= 575))))) OR col4 = 0.88 AND col0 >= 45 OR col0 IS NULL) OR (col1 > 781.55 OR ((col0 IN (SELECT col3 FROM tab4 WHERE ((((col4 <= 331.6) OR (col3 > 246)))))))) OR (col3 = 104) AND (col3 > 393) AND ((((col3 >= 838))) AND (((col3 > 739 OR col3 IN (890,906,320) AND col0 > 101 OR col0 >= 794) OR col0 > 843 OR col4 IS NULL) AND col0 < 432)) OR col1 > 531.22 AND ((col3 BETWEEN 616 AND 891)) OR col0 >= 521 AND (col0 > 591 OR (col3 > 738)) OR col3 >= 89) OR (col3 IN (433,992,72) AND col1 IN (812.5,193.69) AND ((col1 >= 981.48)) AND (col4 >= 167.18 AND col0 > 622 OR col3 > 94))) AND col1 > 12.25) AND col0 >= 126 OR ((col4 < 61.47)) OR (col3 <= 462))) OR col0 < 783) OR (col0 IS NULL)))
----
48 values hashing to e5dfebfd6b7ef5f4a7a15529ab7ed36f

statement ok
DROP VIEW view_1_tab4_617

statement ok
DROP VIEW view_2_tab4_617

statement ok
DROP VIEW view_3_tab4_617

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_618 AS SELECT pk, col0 FROM tab0 WHERE col0 < 883

statement ok
CREATE VIEW view_2_tab0_618 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 883)

statement ok
CREATE VIEW view_3_tab0_618 AS SELECT pk FROM view_1_tab0_618

query II rowsort label-2100-1
SELECT pk, col0 FROM tab0 WHERE col0 < 883
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

query II rowsort label-2100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 883)
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab0_618
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab0_618
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 883 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 883)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_618 UNION ALL SELECT pk, col0 FROM view_2_tab0_618
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 883 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 883)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_618 UNION SELECT pk, col0 FROM view_2_tab0_618
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 883 ) AS tab0_618
----
88 values hashing to 684d9d9f2e4dfc4368dcc0d07416fc4c

query I rowsort label-2100-3
SELECT * FROM view_3_tab0_618
----
88 values hashing to 684d9d9f2e4dfc4368dcc0d07416fc4c

query I rowsort label-2100-3
SELECT pk FROM tab0 WHERE col0 < 883
----
88 values hashing to 684d9d9f2e4dfc4368dcc0d07416fc4c

statement ok
DROP VIEW view_1_tab0_618

statement ok
DROP VIEW view_2_tab0_618

statement ok
DROP VIEW view_3_tab0_618

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_618 AS SELECT pk, col0 FROM tab1 WHERE col0 < 883

statement ok
CREATE VIEW view_2_tab1_618 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 883)

statement ok
CREATE VIEW view_3_tab1_618 AS SELECT pk FROM view_1_tab1_618

query II rowsort label-2100-1
SELECT pk, col0 FROM tab1 WHERE col0 < 883
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

query II rowsort label-2100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 883)
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab1_618
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab1_618
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 883 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 883)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_618 UNION ALL SELECT pk, col0 FROM view_2_tab1_618
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 883 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 883)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_618 UNION SELECT pk, col0 FROM view_2_tab1_618
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 883 ) AS tab1_618
----
88 values hashing to 684d9d9f2e4dfc4368dcc0d07416fc4c

query I rowsort label-2100-3
SELECT * FROM view_3_tab1_618
----
88 values hashing to 684d9d9f2e4dfc4368dcc0d07416fc4c

query I rowsort label-2100-3
SELECT pk FROM tab1 WHERE col0 < 883
----
88 values hashing to 684d9d9f2e4dfc4368dcc0d07416fc4c

statement ok
DROP VIEW view_1_tab1_618

statement ok
DROP VIEW view_2_tab1_618

statement ok
DROP VIEW view_3_tab1_618

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_618 AS SELECT pk, col0 FROM tab2 WHERE col0 < 883

statement ok
CREATE VIEW view_2_tab2_618 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 883)

statement ok
CREATE VIEW view_3_tab2_618 AS SELECT pk FROM view_1_tab2_618

query II rowsort label-2100-1
SELECT pk, col0 FROM tab2 WHERE col0 < 883
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

query II rowsort label-2100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 883)
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab2_618
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab2_618
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 883 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 883)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_618 UNION ALL SELECT pk, col0 FROM view_2_tab2_618
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 883 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 883)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_618 UNION SELECT pk, col0 FROM view_2_tab2_618
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 883 ) AS tab2_618
----
88 values hashing to 684d9d9f2e4dfc4368dcc0d07416fc4c

query I rowsort label-2100-3
SELECT * FROM view_3_tab2_618
----
88 values hashing to 684d9d9f2e4dfc4368dcc0d07416fc4c

query I rowsort label-2100-3
SELECT pk FROM tab2 WHERE col0 < 883
----
88 values hashing to 684d9d9f2e4dfc4368dcc0d07416fc4c

statement ok
DROP VIEW view_1_tab2_618

statement ok
DROP VIEW view_2_tab2_618

statement ok
DROP VIEW view_3_tab2_618

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_618 AS SELECT pk, col0 FROM tab3 WHERE col0 < 883

statement ok
CREATE VIEW view_2_tab3_618 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 883)

statement ok
CREATE VIEW view_3_tab3_618 AS SELECT pk FROM view_1_tab3_618

query II rowsort label-2100-1
SELECT pk, col0 FROM tab3 WHERE col0 < 883
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

query II rowsort label-2100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 883)
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab3_618
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab3_618
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 883 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 883)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_618 UNION ALL SELECT pk, col0 FROM view_2_tab3_618
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 883 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 883)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_618 UNION SELECT pk, col0 FROM view_2_tab3_618
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 883 ) AS tab3_618
----
88 values hashing to 684d9d9f2e4dfc4368dcc0d07416fc4c

query I rowsort label-2100-3
SELECT * FROM view_3_tab3_618
----
88 values hashing to 684d9d9f2e4dfc4368dcc0d07416fc4c

query I rowsort label-2100-3
SELECT pk FROM tab3 WHERE col0 < 883
----
88 values hashing to 684d9d9f2e4dfc4368dcc0d07416fc4c

statement ok
DROP VIEW view_1_tab3_618

statement ok
DROP VIEW view_2_tab3_618

statement ok
DROP VIEW view_3_tab3_618

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_618 AS SELECT pk, col0 FROM tab4 WHERE col0 < 883

statement ok
CREATE VIEW view_2_tab4_618 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 883)

statement ok
CREATE VIEW view_3_tab4_618 AS SELECT pk FROM view_1_tab4_618

query II rowsort label-2100-1
SELECT pk, col0 FROM tab4 WHERE col0 < 883
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

query II rowsort label-2100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 883)
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab4_618
----
176 values hashing to 5e00962a363b60ab5a0bbd48373a69a9

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab4_618
----
24 values hashing to 82c328381521dfbfd4dce7653ec53f59

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 883 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 883)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_618 UNION ALL SELECT pk, col0 FROM view_2_tab4_618
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 883 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 883)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_618 UNION SELECT pk, col0 FROM view_2_tab4_618
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 883 ) AS tab4_618
----
88 values hashing to 684d9d9f2e4dfc4368dcc0d07416fc4c

query I rowsort label-2100-3
SELECT * FROM view_3_tab4_618
----
88 values hashing to 684d9d9f2e4dfc4368dcc0d07416fc4c

query I rowsort label-2100-3
SELECT pk FROM tab4 WHERE col0 < 883
----
88 values hashing to 684d9d9f2e4dfc4368dcc0d07416fc4c

statement ok
DROP VIEW view_1_tab4_618

statement ok
DROP VIEW view_2_tab4_618

statement ok
DROP VIEW view_3_tab4_618

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_619 AS SELECT pk, col0 FROM tab0 WHERE (col1 > 218.76)

statement ok
CREATE VIEW view_2_tab0_619 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 218.76))

statement ok
CREATE VIEW view_3_tab0_619 AS SELECT pk FROM view_1_tab0_619

query II rowsort label-2200-1
SELECT pk, col0 FROM tab0 WHERE (col1 > 218.76)
----
156 values hashing to 2489d820252aed0aab70a54613ebe0d6

query II rowsort label-2200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 218.76))
----
44 values hashing to d3943cdbfc03a99a6a79804e6752d125

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab0_619
----
156 values hashing to 2489d820252aed0aab70a54613ebe0d6

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab0_619
----
44 values hashing to d3943cdbfc03a99a6a79804e6752d125

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 > 218.76) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 218.76))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_619 UNION ALL SELECT pk, col0 FROM view_2_tab0_619
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 > 218.76) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 218.76))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_619 UNION SELECT pk, col0 FROM view_2_tab0_619
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 > 218.76) ) AS tab0_619
----
78 values hashing to 302082b93d47a7735e6c35c90ee28711

query I rowsort label-2200-3
SELECT * FROM view_3_tab0_619
----
78 values hashing to 302082b93d47a7735e6c35c90ee28711

query I rowsort label-2200-3
SELECT pk FROM tab0 WHERE (col1 > 218.76)
----
78 values hashing to 302082b93d47a7735e6c35c90ee28711

statement ok
DROP VIEW view_1_tab0_619

statement ok
DROP VIEW view_2_tab0_619

statement ok
DROP VIEW view_3_tab0_619

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_619 AS SELECT pk, col0 FROM tab1 WHERE (col1 > 218.76)

statement ok
CREATE VIEW view_2_tab1_619 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 218.76))

statement ok
CREATE VIEW view_3_tab1_619 AS SELECT pk FROM view_1_tab1_619

query II rowsort label-2200-1
SELECT pk, col0 FROM tab1 WHERE (col1 > 218.76)
----
156 values hashing to 2489d820252aed0aab70a54613ebe0d6

query II rowsort label-2200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 218.76))
----
44 values hashing to d3943cdbfc03a99a6a79804e6752d125

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab1_619
----
156 values hashing to 2489d820252aed0aab70a54613ebe0d6

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab1_619
----
44 values hashing to d3943cdbfc03a99a6a79804e6752d125

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 > 218.76) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 218.76))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_619 UNION ALL SELECT pk, col0 FROM view_2_tab1_619
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 > 218.76) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 218.76))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_619 UNION SELECT pk, col0 FROM view_2_tab1_619
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 > 218.76) ) AS tab1_619
----
78 values hashing to 302082b93d47a7735e6c35c90ee28711

query I rowsort label-2200-3
SELECT * FROM view_3_tab1_619
----
78 values hashing to 302082b93d47a7735e6c35c90ee28711

query I rowsort label-2200-3
SELECT pk FROM tab1 WHERE (col1 > 218.76)
----
78 values hashing to 302082b93d47a7735e6c35c90ee28711

statement ok
DROP VIEW view_1_tab1_619

statement ok
DROP VIEW view_2_tab1_619

statement ok
DROP VIEW view_3_tab1_619

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_619 AS SELECT pk, col0 FROM tab2 WHERE (col1 > 218.76)

statement ok
CREATE VIEW view_2_tab2_619 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 218.76))

statement ok
CREATE VIEW view_3_tab2_619 AS SELECT pk FROM view_1_tab2_619

query II rowsort label-2200-1
SELECT pk, col0 FROM tab2 WHERE (col1 > 218.76)
----
156 values hashing to 2489d820252aed0aab70a54613ebe0d6

query II rowsort label-2200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 218.76))
----
44 values hashing to d3943cdbfc03a99a6a79804e6752d125

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab2_619
----
156 values hashing to 2489d820252aed0aab70a54613ebe0d6

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab2_619
----
44 values hashing to d3943cdbfc03a99a6a79804e6752d125

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 > 218.76) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 218.76))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_619 UNION ALL SELECT pk, col0 FROM view_2_tab2_619
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 > 218.76) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 218.76))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_619 UNION SELECT pk, col0 FROM view_2_tab2_619
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 > 218.76) ) AS tab2_619
----
78 values hashing to 302082b93d47a7735e6c35c90ee28711

query I rowsort label-2200-3
SELECT * FROM view_3_tab2_619
----
78 values hashing to 302082b93d47a7735e6c35c90ee28711

query I rowsort label-2200-3
SELECT pk FROM tab2 WHERE (col1 > 218.76)
----
78 values hashing to 302082b93d47a7735e6c35c90ee28711

statement ok
DROP VIEW view_1_tab2_619

statement ok
DROP VIEW view_2_tab2_619

statement ok
DROP VIEW view_3_tab2_619

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_619 AS SELECT pk, col0 FROM tab3 WHERE (col1 > 218.76)

statement ok
CREATE VIEW view_2_tab3_619 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 218.76))

statement ok
CREATE VIEW view_3_tab3_619 AS SELECT pk FROM view_1_tab3_619

query II rowsort label-2200-1
SELECT pk, col0 FROM tab3 WHERE (col1 > 218.76)
----
156 values hashing to 2489d820252aed0aab70a54613ebe0d6

query II rowsort label-2200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 218.76))
----
44 values hashing to d3943cdbfc03a99a6a79804e6752d125

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab3_619
----
156 values hashing to 2489d820252aed0aab70a54613ebe0d6

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab3_619
----
44 values hashing to d3943cdbfc03a99a6a79804e6752d125

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 > 218.76) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 218.76))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_619 UNION ALL SELECT pk, col0 FROM view_2_tab3_619
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 > 218.76) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 218.76))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_619 UNION SELECT pk, col0 FROM view_2_tab3_619
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 > 218.76) ) AS tab3_619
----
78 values hashing to 302082b93d47a7735e6c35c90ee28711

query I rowsort label-2200-3
SELECT * FROM view_3_tab3_619
----
78 values hashing to 302082b93d47a7735e6c35c90ee28711

query I rowsort label-2200-3
SELECT pk FROM tab3 WHERE (col1 > 218.76)
----
78 values hashing to 302082b93d47a7735e6c35c90ee28711

statement ok
DROP VIEW view_1_tab3_619

statement ok
DROP VIEW view_2_tab3_619

statement ok
DROP VIEW view_3_tab3_619

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_619 AS SELECT pk, col0 FROM tab4 WHERE (col1 > 218.76)

statement ok
CREATE VIEW view_2_tab4_619 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 218.76))

statement ok
CREATE VIEW view_3_tab4_619 AS SELECT pk FROM view_1_tab4_619

query II rowsort label-2200-1
SELECT pk, col0 FROM tab4 WHERE (col1 > 218.76)
----
156 values hashing to 2489d820252aed0aab70a54613ebe0d6

query II rowsort label-2200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 218.76))
----
44 values hashing to d3943cdbfc03a99a6a79804e6752d125

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab4_619
----
156 values hashing to 2489d820252aed0aab70a54613ebe0d6

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab4_619
----
44 values hashing to d3943cdbfc03a99a6a79804e6752d125

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 > 218.76) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 218.76))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_619 UNION ALL SELECT pk, col0 FROM view_2_tab4_619
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 > 218.76) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 218.76))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_619 UNION SELECT pk, col0 FROM view_2_tab4_619
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 > 218.76) ) AS tab4_619
----
78 values hashing to 302082b93d47a7735e6c35c90ee28711

query I rowsort label-2200-3
SELECT * FROM view_3_tab4_619
----
78 values hashing to 302082b93d47a7735e6c35c90ee28711

query I rowsort label-2200-3
SELECT pk FROM tab4 WHERE (col1 > 218.76)
----
78 values hashing to 302082b93d47a7735e6c35c90ee28711

statement ok
DROP VIEW view_1_tab4_619

statement ok
DROP VIEW view_2_tab4_619

statement ok
DROP VIEW view_3_tab4_619

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_620 AS SELECT pk, col0 FROM tab0 WHERE (col0 <= 196) OR col4 >= 611.16

statement ok
CREATE VIEW view_2_tab0_620 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)

statement ok
CREATE VIEW view_3_tab0_620 AS SELECT pk FROM view_1_tab0_620

query II rowsort label-2300-1
SELECT pk, col0 FROM tab0 WHERE (col0 <= 196) OR col4 >= 611.16
----
110 values hashing to c401ca7ce69b74dec6cbc441aeb32c8b

query II rowsort label-2300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)
----
90 values hashing to bb647d1a125501d1bf330c57b8cb77b9

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab0_620
----
110 values hashing to c401ca7ce69b74dec6cbc441aeb32c8b

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab0_620
----
90 values hashing to bb647d1a125501d1bf330c57b8cb77b9

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 <= 196) OR col4 >= 611.16 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_620 UNION ALL SELECT pk, col0 FROM view_2_tab0_620
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 <= 196) OR col4 >= 611.16 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_620 UNION SELECT pk, col0 FROM view_2_tab0_620
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 <= 196) OR col4 >= 611.16 ) AS tab0_620
----
55 values hashing to 3d6393ef56506c281a37d929d9dcb451

query I rowsort label-2300-3
SELECT * FROM view_3_tab0_620
----
55 values hashing to 3d6393ef56506c281a37d929d9dcb451

query I rowsort label-2300-3
SELECT pk FROM tab0 WHERE (col0 <= 196) OR col4 >= 611.16
----
55 values hashing to 3d6393ef56506c281a37d929d9dcb451

statement ok
DROP VIEW view_1_tab0_620

statement ok
DROP VIEW view_2_tab0_620

statement ok
DROP VIEW view_3_tab0_620

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_620 AS SELECT pk, col0 FROM tab1 WHERE (col0 <= 196) OR col4 >= 611.16

statement ok
CREATE VIEW view_2_tab1_620 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)

statement ok
CREATE VIEW view_3_tab1_620 AS SELECT pk FROM view_1_tab1_620

query II rowsort label-2300-1
SELECT pk, col0 FROM tab1 WHERE (col0 <= 196) OR col4 >= 611.16
----
110 values hashing to c401ca7ce69b74dec6cbc441aeb32c8b

query II rowsort label-2300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)
----
90 values hashing to bb647d1a125501d1bf330c57b8cb77b9

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab1_620
----
110 values hashing to c401ca7ce69b74dec6cbc441aeb32c8b

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab1_620
----
90 values hashing to bb647d1a125501d1bf330c57b8cb77b9

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 <= 196) OR col4 >= 611.16 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_620 UNION ALL SELECT pk, col0 FROM view_2_tab1_620
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 <= 196) OR col4 >= 611.16 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_620 UNION SELECT pk, col0 FROM view_2_tab1_620
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 <= 196) OR col4 >= 611.16 ) AS tab1_620
----
55 values hashing to 3d6393ef56506c281a37d929d9dcb451

query I rowsort label-2300-3
SELECT * FROM view_3_tab1_620
----
55 values hashing to 3d6393ef56506c281a37d929d9dcb451

query I rowsort label-2300-3
SELECT pk FROM tab1 WHERE (col0 <= 196) OR col4 >= 611.16
----
55 values hashing to 3d6393ef56506c281a37d929d9dcb451

statement ok
DROP VIEW view_1_tab1_620

statement ok
DROP VIEW view_2_tab1_620

statement ok
DROP VIEW view_3_tab1_620

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_620 AS SELECT pk, col0 FROM tab2 WHERE (col0 <= 196) OR col4 >= 611.16

statement ok
CREATE VIEW view_2_tab2_620 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)

statement ok
CREATE VIEW view_3_tab2_620 AS SELECT pk FROM view_1_tab2_620

query II rowsort label-2300-1
SELECT pk, col0 FROM tab2 WHERE (col0 <= 196) OR col4 >= 611.16
----
110 values hashing to c401ca7ce69b74dec6cbc441aeb32c8b

query II rowsort label-2300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)
----
90 values hashing to bb647d1a125501d1bf330c57b8cb77b9

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab2_620
----
110 values hashing to c401ca7ce69b74dec6cbc441aeb32c8b

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab2_620
----
90 values hashing to bb647d1a125501d1bf330c57b8cb77b9

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 <= 196) OR col4 >= 611.16 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_620 UNION ALL SELECT pk, col0 FROM view_2_tab2_620
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 <= 196) OR col4 >= 611.16 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_620 UNION SELECT pk, col0 FROM view_2_tab2_620
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 <= 196) OR col4 >= 611.16 ) AS tab2_620
----
55 values hashing to 3d6393ef56506c281a37d929d9dcb451

query I rowsort label-2300-3
SELECT * FROM view_3_tab2_620
----
55 values hashing to 3d6393ef56506c281a37d929d9dcb451

query I rowsort label-2300-3
SELECT pk FROM tab2 WHERE (col0 <= 196) OR col4 >= 611.16
----
55 values hashing to 3d6393ef56506c281a37d929d9dcb451

statement ok
DROP VIEW view_1_tab2_620

statement ok
DROP VIEW view_2_tab2_620

statement ok
DROP VIEW view_3_tab2_620

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_620 AS SELECT pk, col0 FROM tab3 WHERE (col0 <= 196) OR col4 >= 611.16

statement ok
CREATE VIEW view_2_tab3_620 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)

statement ok
CREATE VIEW view_3_tab3_620 AS SELECT pk FROM view_1_tab3_620

query II rowsort label-2300-1
SELECT pk, col0 FROM tab3 WHERE (col0 <= 196) OR col4 >= 611.16
----
110 values hashing to c401ca7ce69b74dec6cbc441aeb32c8b

query II rowsort label-2300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)
----
90 values hashing to bb647d1a125501d1bf330c57b8cb77b9

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab3_620
----
110 values hashing to c401ca7ce69b74dec6cbc441aeb32c8b

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab3_620
----
90 values hashing to bb647d1a125501d1bf330c57b8cb77b9

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 <= 196) OR col4 >= 611.16 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_620 UNION ALL SELECT pk, col0 FROM view_2_tab3_620
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 <= 196) OR col4 >= 611.16 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_620 UNION SELECT pk, col0 FROM view_2_tab3_620
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 <= 196) OR col4 >= 611.16 ) AS tab3_620
----
55 values hashing to 3d6393ef56506c281a37d929d9dcb451

query I rowsort label-2300-3
SELECT * FROM view_3_tab3_620
----
55 values hashing to 3d6393ef56506c281a37d929d9dcb451

query I rowsort label-2300-3
SELECT pk FROM tab3 WHERE (col0 <= 196) OR col4 >= 611.16
----
55 values hashing to 3d6393ef56506c281a37d929d9dcb451

statement ok
DROP VIEW view_1_tab3_620

statement ok
DROP VIEW view_2_tab3_620

statement ok
DROP VIEW view_3_tab3_620

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

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

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

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_620

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_620') DROP VIEW view_3_tab4_620

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_620

statement ok
CREATE VIEW view_1_tab4_620 AS SELECT pk, col0 FROM tab4 WHERE (col0 <= 196) OR col4 >= 611.16

statement ok
CREATE VIEW view_2_tab4_620 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)

statement ok
CREATE VIEW view_3_tab4_620 AS SELECT pk FROM view_1_tab4_620

query II rowsort label-2300-1
SELECT pk, col0 FROM tab4 WHERE (col0 <= 196) OR col4 >= 611.16
----
110 values hashing to c401ca7ce69b74dec6cbc441aeb32c8b

query II rowsort label-2300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)
----
90 values hashing to bb647d1a125501d1bf330c57b8cb77b9

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab4_620
----
110 values hashing to c401ca7ce69b74dec6cbc441aeb32c8b

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab4_620
----
90 values hashing to bb647d1a125501d1bf330c57b8cb77b9

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 <= 196) OR col4 >= 611.16 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_620 UNION ALL SELECT pk, col0 FROM view_2_tab4_620
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 <= 196) OR col4 >= 611.16 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 <= 196) OR col4 >= 611.16)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_620 UNION SELECT pk, col0 FROM view_2_tab4_620
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 <= 196) OR col4 >= 611.16 ) AS tab4_620
----
55 values hashing to 3d6393ef56506c281a37d929d9dcb451

query I rowsort label-2300-3
SELECT * FROM view_3_tab4_620
----
55 values hashing to 3d6393ef56506c281a37d929d9dcb451

query I rowsort label-2300-3
SELECT pk FROM tab4 WHERE (col0 <= 196) OR col4 >= 611.16
----
55 values hashing to 3d6393ef56506c281a37d929d9dcb451

statement ok
DROP VIEW view_1_tab4_620

statement ok
DROP VIEW view_2_tab4_620

statement ok
DROP VIEW view_3_tab4_620

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_621') DROP VIEW view_1_tab0_621

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_621

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_621') DROP VIEW view_2_tab0_621

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_621

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_621') DROP VIEW view_3_tab0_621

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_621

statement ok
CREATE VIEW view_1_tab0_621 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 960

statement ok
CREATE VIEW view_2_tab0_621 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 960)

statement ok
CREATE VIEW view_3_tab0_621 AS SELECT pk FROM view_1_tab0_621

query II rowsort label-2400-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 960
----
37
992
69
996

query II rowsort label-2400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 960)
----
196 values hashing to 975e7b3cd5d8f45e76736a0361b7a233

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab0_621
----
37
992
69
996

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab0_621
----
196 values hashing to 975e7b3cd5d8f45e76736a0361b7a233

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 960 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 960)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_621 UNION ALL SELECT pk, col0 FROM view_2_tab0_621
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 960 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 960)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_621 UNION SELECT pk, col0 FROM view_2_tab0_621
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 960 ) AS tab0_621
----
37
69

query I rowsort label-2400-3
SELECT * FROM view_3_tab0_621
----
37
69

query I rowsort label-2400-3
SELECT pk FROM tab0 WHERE col0 >= 960
----
37
69

statement ok
DROP VIEW view_1_tab0_621

statement ok
DROP VIEW view_2_tab0_621

statement ok
DROP VIEW view_3_tab0_621

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_621') DROP VIEW view_1_tab1_621

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_621

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_621') DROP VIEW view_2_tab1_621

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_621

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_621') DROP VIEW view_3_tab1_621

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_621

statement ok
CREATE VIEW view_1_tab1_621 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 960

statement ok
CREATE VIEW view_2_tab1_621 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 960)

statement ok
CREATE VIEW view_3_tab1_621 AS SELECT pk FROM view_1_tab1_621

query II rowsort label-2400-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 960
----
37
992
69
996

query II rowsort label-2400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 960)
----
196 values hashing to 975e7b3cd5d8f45e76736a0361b7a233

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab1_621
----
37
992
69
996

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab1_621
----
196 values hashing to 975e7b3cd5d8f45e76736a0361b7a233

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 960 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 960)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_621 UNION ALL SELECT pk, col0 FROM view_2_tab1_621
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 960 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 960)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_621 UNION SELECT pk, col0 FROM view_2_tab1_621
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 960 ) AS tab1_621
----
37
69

query I rowsort label-2400-3
SELECT * FROM view_3_tab1_621
----
37
69

query I rowsort label-2400-3
SELECT pk FROM tab1 WHERE col0 >= 960
----
37
69

statement ok
DROP VIEW view_1_tab1_621

statement ok
DROP VIEW view_2_tab1_621

statement ok
DROP VIEW view_3_tab1_621

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_621') DROP VIEW view_1_tab2_621

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_621

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_621') DROP VIEW view_2_tab2_621

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_621

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_621') DROP VIEW view_3_tab2_621

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_621

statement ok
CREATE VIEW view_1_tab2_621 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 960

statement ok
CREATE VIEW view_2_tab2_621 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 960)

statement ok
CREATE VIEW view_3_tab2_621 AS SELECT pk FROM view_1_tab2_621

query II rowsort label-2400-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 960
----
37
992
69
996

query II rowsort label-2400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 960)
----
196 values hashing to 975e7b3cd5d8f45e76736a0361b7a233

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab2_621
----
37
992
69
996

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab2_621
----
196 values hashing to 975e7b3cd5d8f45e76736a0361b7a233

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 960 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 960)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_621 UNION ALL SELECT pk, col0 FROM view_2_tab2_621
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 960 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 960)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_621 UNION SELECT pk, col0 FROM view_2_tab2_621
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 960 ) AS tab2_621
----
37
69

query I rowsort label-2400-3
SELECT * FROM view_3_tab2_621
----
37
69

query I rowsort label-2400-3
SELECT pk FROM tab2 WHERE col0 >= 960
----
37
69

statement ok
DROP VIEW view_1_tab2_621

statement ok
DROP VIEW view_2_tab2_621

statement ok
DROP VIEW view_3_tab2_621

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_621') DROP VIEW view_1_tab3_621

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_621

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_621') DROP VIEW view_2_tab3_621

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_621

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_621') DROP VIEW view_3_tab3_621

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_621

statement ok
CREATE VIEW view_1_tab3_621 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 960

statement ok
CREATE VIEW view_2_tab3_621 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 960)

statement ok
CREATE VIEW view_3_tab3_621 AS SELECT pk FROM view_1_tab3_621

query II rowsort label-2400-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 960
----
37
992
69
996

query II rowsort label-2400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 960)
----
196 values hashing to 975e7b3cd5d8f45e76736a0361b7a233

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab3_621
----
37
992
69
996

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab3_621
----
196 values hashing to 975e7b3cd5d8f45e76736a0361b7a233

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 960 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 960)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_621 UNION ALL SELECT pk, col0 FROM view_2_tab3_621
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 960 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 960)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_621 UNION SELECT pk, col0 FROM view_2_tab3_621
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 960 ) AS tab3_621
----
37
69

query I rowsort label-2400-3
SELECT * FROM view_3_tab3_621
----
37
69

query I rowsort label-2400-3
SELECT pk FROM tab3 WHERE col0 >= 960
----
37
69

statement ok
DROP VIEW view_1_tab3_621

statement ok
DROP VIEW view_2_tab3_621

statement ok
DROP VIEW view_3_tab3_621

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_621') DROP VIEW view_1_tab4_621

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_621

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_621') DROP VIEW view_2_tab4_621

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_621

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_621') DROP VIEW view_3_tab4_621

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_621

statement ok
CREATE VIEW view_1_tab4_621 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 960

statement ok
CREATE VIEW view_2_tab4_621 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 960)

statement ok
CREATE VIEW view_3_tab4_621 AS SELECT pk FROM view_1_tab4_621

query II rowsort label-2400-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 960
----
37
992
69
996

query II rowsort label-2400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 960)
----
196 values hashing to 975e7b3cd5d8f45e76736a0361b7a233

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab4_621
----
37
992
69
996

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab4_621
----
196 values hashing to 975e7b3cd5d8f45e76736a0361b7a233

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 960 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 960)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_621 UNION ALL SELECT pk, col0 FROM view_2_tab4_621
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 960 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 960)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_621 UNION SELECT pk, col0 FROM view_2_tab4_621
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 960 ) AS tab4_621
----
37
69

query I rowsort label-2400-3
SELECT * FROM view_3_tab4_621
----
37
69

query I rowsort label-2400-3
SELECT pk FROM tab4 WHERE col0 >= 960
----
37
69

statement ok
DROP VIEW view_1_tab4_621

statement ok
DROP VIEW view_2_tab4_621

statement ok
DROP VIEW view_3_tab4_621

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_622') DROP VIEW view_1_tab0_622

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_622

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_622') DROP VIEW view_2_tab0_622

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_622

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_622') DROP VIEW view_3_tab0_622

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_622

statement ok
CREATE VIEW view_1_tab0_622 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 206

statement ok
CREATE VIEW view_2_tab0_622 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 206)

statement ok
CREATE VIEW view_3_tab0_622 AS SELECT pk FROM view_1_tab0_622

query II rowsort label-2500-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 206
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-2500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 206)
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab0_622
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab0_622
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 206 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 206)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_622 UNION ALL SELECT pk, col0 FROM view_2_tab0_622
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 206 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 206)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_622 UNION SELECT pk, col0 FROM view_2_tab0_622
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 206 ) AS tab0_622
----
28 values hashing to 97405bd1f31e93ce927cb8f7f8b70802

query I rowsort label-2500-3
SELECT * FROM view_3_tab0_622
----
28 values hashing to 97405bd1f31e93ce927cb8f7f8b70802

query I rowsort label-2500-3
SELECT pk FROM tab0 WHERE col3 <= 206
----
28 values hashing to 97405bd1f31e93ce927cb8f7f8b70802

statement ok
DROP VIEW view_1_tab0_622

statement ok
DROP VIEW view_2_tab0_622

statement ok
DROP VIEW view_3_tab0_622

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_622') DROP VIEW view_1_tab1_622

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_622

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_622') DROP VIEW view_2_tab1_622

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_622

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_622') DROP VIEW view_3_tab1_622

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_622

statement ok
CREATE VIEW view_1_tab1_622 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 206

statement ok
CREATE VIEW view_2_tab1_622 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 206)

statement ok
CREATE VIEW view_3_tab1_622 AS SELECT pk FROM view_1_tab1_622

query II rowsort label-2500-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 206
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-2500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 206)
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab1_622
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab1_622
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 206 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 206)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_622 UNION ALL SELECT pk, col0 FROM view_2_tab1_622
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 206 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 206)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_622 UNION SELECT pk, col0 FROM view_2_tab1_622
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 206 ) AS tab1_622
----
28 values hashing to 97405bd1f31e93ce927cb8f7f8b70802

query I rowsort label-2500-3
SELECT * FROM view_3_tab1_622
----
28 values hashing to 97405bd1f31e93ce927cb8f7f8b70802

query I rowsort label-2500-3
SELECT pk FROM tab1 WHERE col3 <= 206
----
28 values hashing to 97405bd1f31e93ce927cb8f7f8b70802

statement ok
DROP VIEW view_1_tab1_622

statement ok
DROP VIEW view_2_tab1_622

statement ok
DROP VIEW view_3_tab1_622

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_622') DROP VIEW view_1_tab2_622

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_622

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_622') DROP VIEW view_2_tab2_622

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_622

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_622') DROP VIEW view_3_tab2_622

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_622

statement ok
CREATE VIEW view_1_tab2_622 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 206

statement ok
CREATE VIEW view_2_tab2_622 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 206)

statement ok
CREATE VIEW view_3_tab2_622 AS SELECT pk FROM view_1_tab2_622

query II rowsort label-2500-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 206
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-2500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 206)
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab2_622
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab2_622
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 206 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 206)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_622 UNION ALL SELECT pk, col0 FROM view_2_tab2_622
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 206 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 206)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_622 UNION SELECT pk, col0 FROM view_2_tab2_622
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 206 ) AS tab2_622
----
28 values hashing to 97405bd1f31e93ce927cb8f7f8b70802

query I rowsort label-2500-3
SELECT * FROM view_3_tab2_622
----
28 values hashing to 97405bd1f31e93ce927cb8f7f8b70802

query I rowsort label-2500-3
SELECT pk FROM tab2 WHERE col3 <= 206
----
28 values hashing to 97405bd1f31e93ce927cb8f7f8b70802

statement ok
DROP VIEW view_1_tab2_622

statement ok
DROP VIEW view_2_tab2_622

statement ok
DROP VIEW view_3_tab2_622

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_622') DROP VIEW view_1_tab3_622

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_622

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_622') DROP VIEW view_2_tab3_622

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_622

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_622') DROP VIEW view_3_tab3_622

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_622

statement ok
CREATE VIEW view_1_tab3_622 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 206

statement ok
CREATE VIEW view_2_tab3_622 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 206)

statement ok
CREATE VIEW view_3_tab3_622 AS SELECT pk FROM view_1_tab3_622

query II rowsort label-2500-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 206
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-2500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 206)
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab3_622
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab3_622
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 206 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 206)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_622 UNION ALL SELECT pk, col0 FROM view_2_tab3_622
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 206 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 206)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_622 UNION SELECT pk, col0 FROM view_2_tab3_622
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 206 ) AS tab3_622
----
28 values hashing to 97405bd1f31e93ce927cb8f7f8b70802

query I rowsort label-2500-3
SELECT * FROM view_3_tab3_622
----
28 values hashing to 97405bd1f31e93ce927cb8f7f8b70802

query I rowsort label-2500-3
SELECT pk FROM tab3 WHERE col3 <= 206
----
28 values hashing to 97405bd1f31e93ce927cb8f7f8b70802

statement ok
DROP VIEW view_1_tab3_622

statement ok
DROP VIEW view_2_tab3_622

statement ok
DROP VIEW view_3_tab3_622

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_622') DROP VIEW view_1_tab4_622

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_622

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_622') DROP VIEW view_2_tab4_622

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_622

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_622') DROP VIEW view_3_tab4_622

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_622

statement ok
CREATE VIEW view_1_tab4_622 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 206

statement ok
CREATE VIEW view_2_tab4_622 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 206)

statement ok
CREATE VIEW view_3_tab4_622 AS SELECT pk FROM view_1_tab4_622

query II rowsort label-2500-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 206
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-2500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 206)
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab4_622
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab4_622
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 206 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 206)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_622 UNION ALL SELECT pk, col0 FROM view_2_tab4_622
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 206 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 206)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_622 UNION SELECT pk, col0 FROM view_2_tab4_622
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 206 ) AS tab4_622
----
28 values hashing to 97405bd1f31e93ce927cb8f7f8b70802

query I rowsort label-2500-3
SELECT * FROM view_3_tab4_622
----
28 values hashing to 97405bd1f31e93ce927cb8f7f8b70802

query I rowsort label-2500-3
SELECT pk FROM tab4 WHERE col3 <= 206
----
28 values hashing to 97405bd1f31e93ce927cb8f7f8b70802

statement ok
DROP VIEW view_1_tab4_622

statement ok
DROP VIEW view_2_tab4_622

statement ok
DROP VIEW view_3_tab4_622

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_623') DROP VIEW view_1_tab0_623

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_623

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_623') DROP VIEW view_2_tab0_623

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_623

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_623') DROP VIEW view_3_tab0_623

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_623

statement ok
CREATE VIEW view_1_tab0_623 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 920 AND col3 IS NULL

statement ok
CREATE VIEW view_2_tab0_623 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 920 AND col3 IS NULL)

statement ok
CREATE VIEW view_3_tab0_623 AS SELECT pk FROM view_1_tab0_623

query II rowsort label-2600-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 920 AND col3 IS NULL
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 920 AND col3 IS NULL)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab0_623
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab0_623
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 920 AND col3 IS NULL UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 920 AND col3 IS NULL)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_623 UNION ALL SELECT pk, col0 FROM view_2_tab0_623
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 920 AND col3 IS NULL UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 920 AND col3 IS NULL)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_623 UNION SELECT pk, col0 FROM view_2_tab0_623
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 920 AND col3 IS NULL ) AS tab0_623
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab0_623
----

query I rowsort label-2600-3
SELECT pk FROM tab0 WHERE col0 <= 920 AND col3 IS NULL
----

statement ok
DROP VIEW view_1_tab0_623

statement ok
DROP VIEW view_2_tab0_623

statement ok
DROP VIEW view_3_tab0_623

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_623') DROP VIEW view_1_tab1_623

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_623

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_623') DROP VIEW view_2_tab1_623

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_623

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_623') DROP VIEW view_3_tab1_623

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_623

statement ok
CREATE VIEW view_1_tab1_623 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 920 AND col3 IS NULL

statement ok
CREATE VIEW view_2_tab1_623 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 920 AND col3 IS NULL)

statement ok
CREATE VIEW view_3_tab1_623 AS SELECT pk FROM view_1_tab1_623

query II rowsort label-2600-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 920 AND col3 IS NULL
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 920 AND col3 IS NULL)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab1_623
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab1_623
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 920 AND col3 IS NULL UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 920 AND col3 IS NULL)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_623 UNION ALL SELECT pk, col0 FROM view_2_tab1_623
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 920 AND col3 IS NULL UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 920 AND col3 IS NULL)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_623 UNION SELECT pk, col0 FROM view_2_tab1_623
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 920 AND col3 IS NULL ) AS tab1_623
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab1_623
----

query I rowsort label-2600-3
SELECT pk FROM tab1 WHERE col0 <= 920 AND col3 IS NULL
----

statement ok
DROP VIEW view_1_tab1_623

statement ok
DROP VIEW view_2_tab1_623

statement ok
DROP VIEW view_3_tab1_623

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_623') DROP VIEW view_1_tab2_623

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_623

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_623') DROP VIEW view_2_tab2_623

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_623

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_623') DROP VIEW view_3_tab2_623

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_623

statement ok
CREATE VIEW view_1_tab2_623 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 920 AND col3 IS NULL

statement ok
CREATE VIEW view_2_tab2_623 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 920 AND col3 IS NULL)

statement ok
CREATE VIEW view_3_tab2_623 AS SELECT pk FROM view_1_tab2_623

query II rowsort label-2600-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 920 AND col3 IS NULL
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 920 AND col3 IS NULL)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab2_623
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab2_623
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 920 AND col3 IS NULL UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 920 AND col3 IS NULL)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_623 UNION ALL SELECT pk, col0 FROM view_2_tab2_623
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 920 AND col3 IS NULL UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 920 AND col3 IS NULL)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_623 UNION SELECT pk, col0 FROM view_2_tab2_623
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 920 AND col3 IS NULL ) AS tab2_623
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab2_623
----

query I rowsort label-2600-3
SELECT pk FROM tab2 WHERE col0 <= 920 AND col3 IS NULL
----

statement ok
DROP VIEW view_1_tab2_623

statement ok
DROP VIEW view_2_tab2_623

statement ok
DROP VIEW view_3_tab2_623

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_623') DROP VIEW view_1_tab3_623

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_623

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_623') DROP VIEW view_2_tab3_623

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_623

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_623') DROP VIEW view_3_tab3_623

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_623

statement ok
CREATE VIEW view_1_tab3_623 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 920 AND col3 IS NULL

statement ok
CREATE VIEW view_2_tab3_623 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 920 AND col3 IS NULL)

statement ok
CREATE VIEW view_3_tab3_623 AS SELECT pk FROM view_1_tab3_623

query II rowsort label-2600-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 920 AND col3 IS NULL
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 920 AND col3 IS NULL)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab3_623
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab3_623
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 920 AND col3 IS NULL UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 920 AND col3 IS NULL)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_623 UNION ALL SELECT pk, col0 FROM view_2_tab3_623
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 920 AND col3 IS NULL UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 920 AND col3 IS NULL)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_623 UNION SELECT pk, col0 FROM view_2_tab3_623
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 920 AND col3 IS NULL ) AS tab3_623
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab3_623
----

query I rowsort label-2600-3
SELECT pk FROM tab3 WHERE col0 <= 920 AND col3 IS NULL
----

statement ok
DROP VIEW view_1_tab3_623

statement ok
DROP VIEW view_2_tab3_623

statement ok
DROP VIEW view_3_tab3_623

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_623') DROP VIEW view_1_tab4_623

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_623

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_623') DROP VIEW view_2_tab4_623

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_623

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_623') DROP VIEW view_3_tab4_623

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_623

statement ok
CREATE VIEW view_1_tab4_623 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 920 AND col3 IS NULL

statement ok
CREATE VIEW view_2_tab4_623 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 920 AND col3 IS NULL)

statement ok
CREATE VIEW view_3_tab4_623 AS SELECT pk FROM view_1_tab4_623

query II rowsort label-2600-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 920 AND col3 IS NULL
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 920 AND col3 IS NULL)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab4_623
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab4_623
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 920 AND col3 IS NULL UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 920 AND col3 IS NULL)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_623 UNION ALL SELECT pk, col0 FROM view_2_tab4_623
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 920 AND col3 IS NULL UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 920 AND col3 IS NULL)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_623 UNION SELECT pk, col0 FROM view_2_tab4_623
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 920 AND col3 IS NULL ) AS tab4_623
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab4_623
----

query I rowsort label-2600-3
SELECT pk FROM tab4 WHERE col0 <= 920 AND col3 IS NULL
----

statement ok
DROP VIEW view_1_tab4_623

statement ok
DROP VIEW view_2_tab4_623

statement ok
DROP VIEW view_3_tab4_623

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_624') DROP VIEW view_1_tab0_624

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_624

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_624') DROP VIEW view_2_tab0_624

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_624

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_624') DROP VIEW view_3_tab0_624

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_624

statement ok
CREATE VIEW view_1_tab0_624 AS SELECT pk, col0 FROM tab0 WHERE (col1 < 913.71)

statement ok
CREATE VIEW view_2_tab0_624 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 < 913.71))

statement ok
CREATE VIEW view_3_tab0_624 AS SELECT pk FROM view_1_tab0_624

query II rowsort label-2700-1
SELECT pk, col0 FROM tab0 WHERE (col1 < 913.71)
----
192 values hashing to 219095e94f3e05cb89f28099d4359c85

query II rowsort label-2700-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 < 913.71))
----
34
26
37
992
66
906
67
653

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab0_624
----
192 values hashing to 219095e94f3e05cb89f28099d4359c85

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab0_624
----
34
26
37
992
66
906
67
653

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 < 913.71) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 < 913.71))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_624 UNION ALL SELECT pk, col0 FROM view_2_tab0_624
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 < 913.71) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 < 913.71))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_624 UNION SELECT pk, col0 FROM view_2_tab0_624
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 < 913.71) ) AS tab0_624
----
96 values hashing to 85754c1236b9a681305cdf66156e76fe

query I rowsort label-2700-3
SELECT * FROM view_3_tab0_624
----
96 values hashing to 85754c1236b9a681305cdf66156e76fe

query I rowsort label-2700-3
SELECT pk FROM tab0 WHERE (col1 < 913.71)
----
96 values hashing to 85754c1236b9a681305cdf66156e76fe

statement ok
DROP VIEW view_1_tab0_624

statement ok
DROP VIEW view_2_tab0_624

statement ok
DROP VIEW view_3_tab0_624

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_624') DROP VIEW view_1_tab1_624

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_624

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_624') DROP VIEW view_2_tab1_624

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_624

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_624') DROP VIEW view_3_tab1_624

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_624

statement ok
CREATE VIEW view_1_tab1_624 AS SELECT pk, col0 FROM tab1 WHERE (col1 < 913.71)

statement ok
CREATE VIEW view_2_tab1_624 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 < 913.71))

statement ok
CREATE VIEW view_3_tab1_624 AS SELECT pk FROM view_1_tab1_624

query II rowsort label-2700-1
SELECT pk, col0 FROM tab1 WHERE (col1 < 913.71)
----
192 values hashing to 219095e94f3e05cb89f28099d4359c85

query II rowsort label-2700-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 < 913.71))
----
34
26
37
992
66
906
67
653

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab1_624
----
192 values hashing to 219095e94f3e05cb89f28099d4359c85

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab1_624
----
34
26
37
992
66
906
67
653

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 < 913.71) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 < 913.71))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_624 UNION ALL SELECT pk, col0 FROM view_2_tab1_624
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 < 913.71) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 < 913.71))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_624 UNION SELECT pk, col0 FROM view_2_tab1_624
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 < 913.71) ) AS tab1_624
----
96 values hashing to 85754c1236b9a681305cdf66156e76fe

query I rowsort label-2700-3
SELECT * FROM view_3_tab1_624
----
96 values hashing to 85754c1236b9a681305cdf66156e76fe

query I rowsort label-2700-3
SELECT pk FROM tab1 WHERE (col1 < 913.71)
----
96 values hashing to 85754c1236b9a681305cdf66156e76fe

statement ok
DROP VIEW view_1_tab1_624

statement ok
DROP VIEW view_2_tab1_624

statement ok
DROP VIEW view_3_tab1_624

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_624') DROP VIEW view_1_tab2_624

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_624

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_624') DROP VIEW view_2_tab2_624

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_624

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_624') DROP VIEW view_3_tab2_624

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_624

statement ok
CREATE VIEW view_1_tab2_624 AS SELECT pk, col0 FROM tab2 WHERE (col1 < 913.71)

statement ok
CREATE VIEW view_2_tab2_624 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 < 913.71))

statement ok
CREATE VIEW view_3_tab2_624 AS SELECT pk FROM view_1_tab2_624

query II rowsort label-2700-1
SELECT pk, col0 FROM tab2 WHERE (col1 < 913.71)
----
192 values hashing to 219095e94f3e05cb89f28099d4359c85

query II rowsort label-2700-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 < 913.71))
----
34
26
37
992
66
906
67
653

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab2_624
----
192 values hashing to 219095e94f3e05cb89f28099d4359c85

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab2_624
----
34
26
37
992
66
906
67
653

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 < 913.71) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 < 913.71))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_624 UNION ALL SELECT pk, col0 FROM view_2_tab2_624
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 < 913.71) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 < 913.71))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_624 UNION SELECT pk, col0 FROM view_2_tab2_624
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 < 913.71) ) AS tab2_624
----
96 values hashing to 85754c1236b9a681305cdf66156e76fe

query I rowsort label-2700-3
SELECT * FROM view_3_tab2_624
----
96 values hashing to 85754c1236b9a681305cdf66156e76fe

query I rowsort label-2700-3
SELECT pk FROM tab2 WHERE (col1 < 913.71)
----
96 values hashing to 85754c1236b9a681305cdf66156e76fe

statement ok
DROP VIEW view_1_tab2_624

statement ok
DROP VIEW view_2_tab2_624

statement ok
DROP VIEW view_3_tab2_624

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_624') DROP VIEW view_1_tab3_624

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_624

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_624') DROP VIEW view_2_tab3_624

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_624

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_624') DROP VIEW view_3_tab3_624

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_624

statement ok
CREATE VIEW view_1_tab3_624 AS SELECT pk, col0 FROM tab3 WHERE (col1 < 913.71)

statement ok
CREATE VIEW view_2_tab3_624 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 < 913.71))

statement ok
CREATE VIEW view_3_tab3_624 AS SELECT pk FROM view_1_tab3_624

query II rowsort label-2700-1
SELECT pk, col0 FROM tab3 WHERE (col1 < 913.71)
----
192 values hashing to 219095e94f3e05cb89f28099d4359c85

query II rowsort label-2700-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 < 913.71))
----
34
26
37
992
66
906
67
653

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab3_624
----
192 values hashing to 219095e94f3e05cb89f28099d4359c85

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab3_624
----
34
26
37
992
66
906
67
653

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 < 913.71) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 < 913.71))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_624 UNION ALL SELECT pk, col0 FROM view_2_tab3_624
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 < 913.71) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 < 913.71))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_624 UNION SELECT pk, col0 FROM view_2_tab3_624
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 < 913.71) ) AS tab3_624
----
96 values hashing to 85754c1236b9a681305cdf66156e76fe

query I rowsort label-2700-3
SELECT * FROM view_3_tab3_624
----
96 values hashing to 85754c1236b9a681305cdf66156e76fe

query I rowsort label-2700-3
SELECT pk FROM tab3 WHERE (col1 < 913.71)
----
96 values hashing to 85754c1236b9a681305cdf66156e76fe

statement ok
DROP VIEW view_1_tab3_624

statement ok
DROP VIEW view_2_tab3_624

statement ok
DROP VIEW view_3_tab3_624

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_624') DROP VIEW view_1_tab4_624

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_624

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_624') DROP VIEW view_2_tab4_624

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_624

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_624') DROP VIEW view_3_tab4_624

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_624

statement ok
CREATE VIEW view_1_tab4_624 AS SELECT pk, col0 FROM tab4 WHERE (col1 < 913.71)

statement ok
CREATE VIEW view_2_tab4_624 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 < 913.71))

statement ok
CREATE VIEW view_3_tab4_624 AS SELECT pk FROM view_1_tab4_624

query II rowsort label-2700-1
SELECT pk, col0 FROM tab4 WHERE (col1 < 913.71)
----
192 values hashing to 219095e94f3e05cb89f28099d4359c85

query II rowsort label-2700-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 < 913.71))
----
34
26
37
992
66
906
67
653

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab4_624
----
192 values hashing to 219095e94f3e05cb89f28099d4359c85

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab4_624
----
34
26
37
992
66
906
67
653

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 < 913.71) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 < 913.71))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_624 UNION ALL SELECT pk, col0 FROM view_2_tab4_624
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 < 913.71) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 < 913.71))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_624 UNION SELECT pk, col0 FROM view_2_tab4_624
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 < 913.71) ) AS tab4_624
----
96 values hashing to 85754c1236b9a681305cdf66156e76fe

query I rowsort label-2700-3
SELECT * FROM view_3_tab4_624
----
96 values hashing to 85754c1236b9a681305cdf66156e76fe

query I rowsort label-2700-3
SELECT pk FROM tab4 WHERE (col1 < 913.71)
----
96 values hashing to 85754c1236b9a681305cdf66156e76fe

statement ok
DROP VIEW view_1_tab4_624

statement ok
DROP VIEW view_2_tab4_624

statement ok
DROP VIEW view_3_tab4_624

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_625') DROP VIEW view_1_tab0_625

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_625

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_625') DROP VIEW view_2_tab0_625

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_625

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_625') DROP VIEW view_3_tab0_625

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_625

statement ok
CREATE VIEW view_1_tab0_625 AS SELECT pk, col0 FROM tab0 WHERE col1 = 954.53

statement ok
CREATE VIEW view_2_tab0_625 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 954.53)

statement ok
CREATE VIEW view_3_tab0_625 AS SELECT pk FROM view_1_tab0_625

query II rowsort label-2800-1
SELECT pk, col0 FROM tab0 WHERE col1 = 954.53
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 954.53)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab0_625
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab0_625
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 = 954.53 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 954.53)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_625 UNION ALL SELECT pk, col0 FROM view_2_tab0_625
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 = 954.53 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 954.53)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_625 UNION SELECT pk, col0 FROM view_2_tab0_625
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 = 954.53 ) AS tab0_625
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab0_625
----

query I rowsort label-2800-3
SELECT pk FROM tab0 WHERE col1 = 954.53
----

statement ok
DROP VIEW view_1_tab0_625

statement ok
DROP VIEW view_2_tab0_625

statement ok
DROP VIEW view_3_tab0_625

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_625') DROP VIEW view_1_tab1_625

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_625

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_625') DROP VIEW view_2_tab1_625

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_625

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_625') DROP VIEW view_3_tab1_625

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_625

statement ok
CREATE VIEW view_1_tab1_625 AS SELECT pk, col0 FROM tab1 WHERE col1 = 954.53

statement ok
CREATE VIEW view_2_tab1_625 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 954.53)

statement ok
CREATE VIEW view_3_tab1_625 AS SELECT pk FROM view_1_tab1_625

query II rowsort label-2800-1
SELECT pk, col0 FROM tab1 WHERE col1 = 954.53
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 954.53)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab1_625
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab1_625
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 = 954.53 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 954.53)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_625 UNION ALL SELECT pk, col0 FROM view_2_tab1_625
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 = 954.53 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 954.53)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_625 UNION SELECT pk, col0 FROM view_2_tab1_625
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 = 954.53 ) AS tab1_625
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab1_625
----

query I rowsort label-2800-3
SELECT pk FROM tab1 WHERE col1 = 954.53
----

statement ok
DROP VIEW view_1_tab1_625

statement ok
DROP VIEW view_2_tab1_625

statement ok
DROP VIEW view_3_tab1_625

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_625') DROP VIEW view_1_tab2_625

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_625

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_625') DROP VIEW view_2_tab2_625

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_625

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_625') DROP VIEW view_3_tab2_625

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_625

statement ok
CREATE VIEW view_1_tab2_625 AS SELECT pk, col0 FROM tab2 WHERE col1 = 954.53

statement ok
CREATE VIEW view_2_tab2_625 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 954.53)

statement ok
CREATE VIEW view_3_tab2_625 AS SELECT pk FROM view_1_tab2_625

query II rowsort label-2800-1
SELECT pk, col0 FROM tab2 WHERE col1 = 954.53
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 954.53)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab2_625
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab2_625
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 = 954.53 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 954.53)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_625 UNION ALL SELECT pk, col0 FROM view_2_tab2_625
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 = 954.53 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 954.53)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_625 UNION SELECT pk, col0 FROM view_2_tab2_625
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 = 954.53 ) AS tab2_625
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab2_625
----

query I rowsort label-2800-3
SELECT pk FROM tab2 WHERE col1 = 954.53
----

statement ok
DROP VIEW view_1_tab2_625

statement ok
DROP VIEW view_2_tab2_625

statement ok
DROP VIEW view_3_tab2_625

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_625') DROP VIEW view_1_tab3_625

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_625

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_625') DROP VIEW view_2_tab3_625

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_625

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_625') DROP VIEW view_3_tab3_625

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_625

statement ok
CREATE VIEW view_1_tab3_625 AS SELECT pk, col0 FROM tab3 WHERE col1 = 954.53

statement ok
CREATE VIEW view_2_tab3_625 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 954.53)

statement ok
CREATE VIEW view_3_tab3_625 AS SELECT pk FROM view_1_tab3_625

query II rowsort label-2800-1
SELECT pk, col0 FROM tab3 WHERE col1 = 954.53
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 954.53)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab3_625
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab3_625
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 = 954.53 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 954.53)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_625 UNION ALL SELECT pk, col0 FROM view_2_tab3_625
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 = 954.53 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 954.53)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_625 UNION SELECT pk, col0 FROM view_2_tab3_625
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 = 954.53 ) AS tab3_625
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab3_625
----

query I rowsort label-2800-3
SELECT pk FROM tab3 WHERE col1 = 954.53
----

statement ok
DROP VIEW view_1_tab3_625

statement ok
DROP VIEW view_2_tab3_625

statement ok
DROP VIEW view_3_tab3_625

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_625') DROP VIEW view_1_tab4_625

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_625

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_625') DROP VIEW view_2_tab4_625

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_625

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_625') DROP VIEW view_3_tab4_625

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_625

statement ok
CREATE VIEW view_1_tab4_625 AS SELECT pk, col0 FROM tab4 WHERE col1 = 954.53

statement ok
CREATE VIEW view_2_tab4_625 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 954.53)

statement ok
CREATE VIEW view_3_tab4_625 AS SELECT pk FROM view_1_tab4_625

query II rowsort label-2800-1
SELECT pk, col0 FROM tab4 WHERE col1 = 954.53
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 954.53)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab4_625
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab4_625
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 = 954.53 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 954.53)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_625 UNION ALL SELECT pk, col0 FROM view_2_tab4_625
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 = 954.53 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 954.53)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_625 UNION SELECT pk, col0 FROM view_2_tab4_625
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 = 954.53 ) AS tab4_625
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab4_625
----

query I rowsort label-2800-3
SELECT pk FROM tab4 WHERE col1 = 954.53
----

statement ok
DROP VIEW view_1_tab4_625

statement ok
DROP VIEW view_2_tab4_625

statement ok
DROP VIEW view_3_tab4_625

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_626') DROP VIEW view_1_tab0_626

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_626

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_626') DROP VIEW view_2_tab0_626

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_626

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_626') DROP VIEW view_3_tab0_626

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_626

statement ok
CREATE VIEW view_1_tab0_626 AS SELECT pk, col0 FROM tab0 WHERE (col0 > 811)

statement ok
CREATE VIEW view_2_tab0_626 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 811))

statement ok
CREATE VIEW view_3_tab0_626 AS SELECT pk FROM view_1_tab0_626

query II rowsort label-2900-1
SELECT pk, col0 FROM tab0 WHERE (col0 > 811)
----
40 values hashing to 76d5905c43a49ab6649eab923e4c76f0

query II rowsort label-2900-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 811))
----
160 values hashing to 1b2cdb6119eb5628703f8926df85a729

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab0_626
----
40 values hashing to 76d5905c43a49ab6649eab923e4c76f0

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab0_626
----
160 values hashing to 1b2cdb6119eb5628703f8926df85a729

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 811) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 811))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_626 UNION ALL SELECT pk, col0 FROM view_2_tab0_626
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 811) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 811))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_626 UNION SELECT pk, col0 FROM view_2_tab0_626
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 > 811) ) AS tab0_626
----
20 values hashing to 14b782b7a3e95a04f9eafeb15714855b

query I rowsort label-2900-3
SELECT * FROM view_3_tab0_626
----
20 values hashing to 14b782b7a3e95a04f9eafeb15714855b

query I rowsort label-2900-3
SELECT pk FROM tab0 WHERE (col0 > 811)
----
20 values hashing to 14b782b7a3e95a04f9eafeb15714855b

statement ok
DROP VIEW view_1_tab0_626

statement ok
DROP VIEW view_2_tab0_626

statement ok
DROP VIEW view_3_tab0_626

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_626') DROP VIEW view_1_tab1_626

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_626

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_626') DROP VIEW view_2_tab1_626

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_626

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_626') DROP VIEW view_3_tab1_626

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_626

statement ok
CREATE VIEW view_1_tab1_626 AS SELECT pk, col0 FROM tab1 WHERE (col0 > 811)

statement ok
CREATE VIEW view_2_tab1_626 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 811))

statement ok
CREATE VIEW view_3_tab1_626 AS SELECT pk FROM view_1_tab1_626

query II rowsort label-2900-1
SELECT pk, col0 FROM tab1 WHERE (col0 > 811)
----
40 values hashing to 76d5905c43a49ab6649eab923e4c76f0

query II rowsort label-2900-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 811))
----
160 values hashing to 1b2cdb6119eb5628703f8926df85a729

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab1_626
----
40 values hashing to 76d5905c43a49ab6649eab923e4c76f0

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab1_626
----
160 values hashing to 1b2cdb6119eb5628703f8926df85a729

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 811) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 811))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_626 UNION ALL SELECT pk, col0 FROM view_2_tab1_626
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 811) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 811))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_626 UNION SELECT pk, col0 FROM view_2_tab1_626
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 > 811) ) AS tab1_626
----
20 values hashing to 14b782b7a3e95a04f9eafeb15714855b

query I rowsort label-2900-3
SELECT * FROM view_3_tab1_626
----
20 values hashing to 14b782b7a3e95a04f9eafeb15714855b

query I rowsort label-2900-3
SELECT pk FROM tab1 WHERE (col0 > 811)
----
20 values hashing to 14b782b7a3e95a04f9eafeb15714855b

statement ok
DROP VIEW view_1_tab1_626

statement ok
DROP VIEW view_2_tab1_626

statement ok
DROP VIEW view_3_tab1_626

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_626') DROP VIEW view_1_tab2_626

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_626

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_626') DROP VIEW view_2_tab2_626

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_626

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_626') DROP VIEW view_3_tab2_626

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_626

statement ok
CREATE VIEW view_1_tab2_626 AS SELECT pk, col0 FROM tab2 WHERE (col0 > 811)

statement ok
CREATE VIEW view_2_tab2_626 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 811))

statement ok
CREATE VIEW view_3_tab2_626 AS SELECT pk FROM view_1_tab2_626

query II rowsort label-2900-1
SELECT pk, col0 FROM tab2 WHERE (col0 > 811)
----
40 values hashing to 76d5905c43a49ab6649eab923e4c76f0

query II rowsort label-2900-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 811))
----
160 values hashing to 1b2cdb6119eb5628703f8926df85a729

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab2_626
----
40 values hashing to 76d5905c43a49ab6649eab923e4c76f0

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab2_626
----
160 values hashing to 1b2cdb6119eb5628703f8926df85a729

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 811) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 811))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_626 UNION ALL SELECT pk, col0 FROM view_2_tab2_626
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 811) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 811))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_626 UNION SELECT pk, col0 FROM view_2_tab2_626
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 > 811) ) AS tab2_626
----
20 values hashing to 14b782b7a3e95a04f9eafeb15714855b

query I rowsort label-2900-3
SELECT * FROM view_3_tab2_626
----
20 values hashing to 14b782b7a3e95a04f9eafeb15714855b

query I rowsort label-2900-3
SELECT pk FROM tab2 WHERE (col0 > 811)
----
20 values hashing to 14b782b7a3e95a04f9eafeb15714855b

statement ok
DROP VIEW view_1_tab2_626

statement ok
DROP VIEW view_2_tab2_626

statement ok
DROP VIEW view_3_tab2_626

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_626') DROP VIEW view_1_tab3_626

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_626

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_626') DROP VIEW view_2_tab3_626

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_626

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_626') DROP VIEW view_3_tab3_626

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_626

statement ok
CREATE VIEW view_1_tab3_626 AS SELECT pk, col0 FROM tab3 WHERE (col0 > 811)

statement ok
CREATE VIEW view_2_tab3_626 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 811))

statement ok
CREATE VIEW view_3_tab3_626 AS SELECT pk FROM view_1_tab3_626

query II rowsort label-2900-1
SELECT pk, col0 FROM tab3 WHERE (col0 > 811)
----
40 values hashing to 76d5905c43a49ab6649eab923e4c76f0

query II rowsort label-2900-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 811))
----
160 values hashing to 1b2cdb6119eb5628703f8926df85a729

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab3_626
----
40 values hashing to 76d5905c43a49ab6649eab923e4c76f0

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab3_626
----
160 values hashing to 1b2cdb6119eb5628703f8926df85a729

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 811) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 811))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_626 UNION ALL SELECT pk, col0 FROM view_2_tab3_626
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 811) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 811))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_626 UNION SELECT pk, col0 FROM view_2_tab3_626
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 > 811) ) AS tab3_626
----
20 values hashing to 14b782b7a3e95a04f9eafeb15714855b

query I rowsort label-2900-3
SELECT * FROM view_3_tab3_626
----
20 values hashing to 14b782b7a3e95a04f9eafeb15714855b

query I rowsort label-2900-3
SELECT pk FROM tab3 WHERE (col0 > 811)
----
20 values hashing to 14b782b7a3e95a04f9eafeb15714855b

statement ok
DROP VIEW view_1_tab3_626

statement ok
DROP VIEW view_2_tab3_626

statement ok
DROP VIEW view_3_tab3_626

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_626') DROP VIEW view_1_tab4_626

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_626

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_626') DROP VIEW view_2_tab4_626

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_626

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_626') DROP VIEW view_3_tab4_626

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_626

statement ok
CREATE VIEW view_1_tab4_626 AS SELECT pk, col0 FROM tab4 WHERE (col0 > 811)

statement ok
CREATE VIEW view_2_tab4_626 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 811))

statement ok
CREATE VIEW view_3_tab4_626 AS SELECT pk FROM view_1_tab4_626

query II rowsort label-2900-1
SELECT pk, col0 FROM tab4 WHERE (col0 > 811)
----
40 values hashing to 76d5905c43a49ab6649eab923e4c76f0

query II rowsort label-2900-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 811))
----
160 values hashing to 1b2cdb6119eb5628703f8926df85a729

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab4_626
----
40 values hashing to 76d5905c43a49ab6649eab923e4c76f0

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab4_626
----
160 values hashing to 1b2cdb6119eb5628703f8926df85a729

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 811) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 811))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_626 UNION ALL SELECT pk, col0 FROM view_2_tab4_626
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 811) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 811))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_626 UNION SELECT pk, col0 FROM view_2_tab4_626
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 > 811) ) AS tab4_626
----
20 values hashing to 14b782b7a3e95a04f9eafeb15714855b

query I rowsort label-2900-3
SELECT * FROM view_3_tab4_626
----
20 values hashing to 14b782b7a3e95a04f9eafeb15714855b

query I rowsort label-2900-3
SELECT pk FROM tab4 WHERE (col0 > 811)
----
20 values hashing to 14b782b7a3e95a04f9eafeb15714855b

statement ok
DROP VIEW view_1_tab4_626

statement ok
DROP VIEW view_2_tab4_626

statement ok
DROP VIEW view_3_tab4_626

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_627') DROP VIEW view_1_tab0_627

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_627

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_627') DROP VIEW view_2_tab0_627

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_627

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_627') DROP VIEW view_3_tab0_627

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_627

statement ok
CREATE VIEW view_1_tab0_627 AS SELECT pk, col0 FROM tab0 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162

statement ok
CREATE VIEW view_2_tab0_627 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)

statement ok
CREATE VIEW view_3_tab0_627 AS SELECT pk FROM view_1_tab0_627

query II rowsort label-3000-1
SELECT pk, col0 FROM tab0 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162
----
70
712
74
928

query II rowsort label-3000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)
----
196 values hashing to 5e9c1c183ea57f14e129f009a301a110

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab0_627
----
70
712
74
928

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab0_627
----
196 values hashing to 5e9c1c183ea57f14e129f009a301a110

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_627 UNION ALL SELECT pk, col0 FROM view_2_tab0_627
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_627 UNION SELECT pk, col0 FROM view_2_tab0_627
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162 ) AS tab0_627
----
70
74

query I rowsort label-3000-3
SELECT * FROM view_3_tab0_627
----
70
74

query I rowsort label-3000-3
SELECT pk FROM tab0 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162
----
70
74

statement ok
DROP VIEW view_1_tab0_627

statement ok
DROP VIEW view_2_tab0_627

statement ok
DROP VIEW view_3_tab0_627

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_627') DROP VIEW view_1_tab1_627

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_627

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_627') DROP VIEW view_2_tab1_627

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_627

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_627') DROP VIEW view_3_tab1_627

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_627

statement ok
CREATE VIEW view_1_tab1_627 AS SELECT pk, col0 FROM tab1 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162

statement ok
CREATE VIEW view_2_tab1_627 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)

statement ok
CREATE VIEW view_3_tab1_627 AS SELECT pk FROM view_1_tab1_627

query II rowsort label-3000-1
SELECT pk, col0 FROM tab1 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162
----
70
712
74
928

query II rowsort label-3000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)
----
196 values hashing to 5e9c1c183ea57f14e129f009a301a110

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab1_627
----
70
712
74
928

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab1_627
----
196 values hashing to 5e9c1c183ea57f14e129f009a301a110

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_627 UNION ALL SELECT pk, col0 FROM view_2_tab1_627
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_627 UNION SELECT pk, col0 FROM view_2_tab1_627
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162 ) AS tab1_627
----
70
74

query I rowsort label-3000-3
SELECT * FROM view_3_tab1_627
----
70
74

query I rowsort label-3000-3
SELECT pk FROM tab1 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162
----
70
74

statement ok
DROP VIEW view_1_tab1_627

statement ok
DROP VIEW view_2_tab1_627

statement ok
DROP VIEW view_3_tab1_627

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_627') DROP VIEW view_1_tab2_627

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_627

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_627') DROP VIEW view_2_tab2_627

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_627

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_627') DROP VIEW view_3_tab2_627

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_627

statement ok
CREATE VIEW view_1_tab2_627 AS SELECT pk, col0 FROM tab2 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162

statement ok
CREATE VIEW view_2_tab2_627 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)

statement ok
CREATE VIEW view_3_tab2_627 AS SELECT pk FROM view_1_tab2_627

query II rowsort label-3000-1
SELECT pk, col0 FROM tab2 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162
----
70
712
74
928

query II rowsort label-3000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)
----
196 values hashing to 5e9c1c183ea57f14e129f009a301a110

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab2_627
----
70
712
74
928

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab2_627
----
196 values hashing to 5e9c1c183ea57f14e129f009a301a110

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_627 UNION ALL SELECT pk, col0 FROM view_2_tab2_627
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_627 UNION SELECT pk, col0 FROM view_2_tab2_627
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162 ) AS tab2_627
----
70
74

query I rowsort label-3000-3
SELECT * FROM view_3_tab2_627
----
70
74

query I rowsort label-3000-3
SELECT pk FROM tab2 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162
----
70
74

statement ok
DROP VIEW view_1_tab2_627

statement ok
DROP VIEW view_2_tab2_627

statement ok
DROP VIEW view_3_tab2_627

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_627') DROP VIEW view_1_tab3_627

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_627

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_627') DROP VIEW view_2_tab3_627

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_627

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_627') DROP VIEW view_3_tab3_627

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_627

statement ok
CREATE VIEW view_1_tab3_627 AS SELECT pk, col0 FROM tab3 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162

statement ok
CREATE VIEW view_2_tab3_627 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)

statement ok
CREATE VIEW view_3_tab3_627 AS SELECT pk FROM view_1_tab3_627

query II rowsort label-3000-1
SELECT pk, col0 FROM tab3 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162
----
70
712
74
928

query II rowsort label-3000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)
----
196 values hashing to 5e9c1c183ea57f14e129f009a301a110

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab3_627
----
70
712
74
928

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab3_627
----
196 values hashing to 5e9c1c183ea57f14e129f009a301a110

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_627 UNION ALL SELECT pk, col0 FROM view_2_tab3_627
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_627 UNION SELECT pk, col0 FROM view_2_tab3_627
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162 ) AS tab3_627
----
70
74

query I rowsort label-3000-3
SELECT * FROM view_3_tab3_627
----
70
74

query I rowsort label-3000-3
SELECT pk FROM tab3 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162
----
70
74

statement ok
DROP VIEW view_1_tab3_627

statement ok
DROP VIEW view_2_tab3_627

statement ok
DROP VIEW view_3_tab3_627

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_627') DROP VIEW view_1_tab4_627

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_627

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_627') DROP VIEW view_2_tab4_627

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_627

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_627') DROP VIEW view_3_tab4_627

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_627

statement ok
CREATE VIEW view_1_tab4_627 AS SELECT pk, col0 FROM tab4 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162

statement ok
CREATE VIEW view_2_tab4_627 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)

statement ok
CREATE VIEW view_3_tab4_627 AS SELECT pk FROM view_1_tab4_627

query II rowsort label-3000-1
SELECT pk, col0 FROM tab4 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162
----
70
712
74
928

query II rowsort label-3000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)
----
196 values hashing to 5e9c1c183ea57f14e129f009a301a110

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab4_627
----
70
712
74
928

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab4_627
----
196 values hashing to 5e9c1c183ea57f14e129f009a301a110

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_627 UNION ALL SELECT pk, col0 FROM view_2_tab4_627
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_627 UNION SELECT pk, col0 FROM view_2_tab4_627
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162 ) AS tab4_627
----
70
74

query I rowsort label-3000-3
SELECT * FROM view_3_tab4_627
----
70
74

query I rowsort label-3000-3
SELECT pk FROM tab4 WHERE (col3 >= 136) AND (col0 > 690 OR col3 IN (784,454,994,878,757)) AND col3 <= 162
----
70
74

statement ok
DROP VIEW view_1_tab4_627

statement ok
DROP VIEW view_2_tab4_627

statement ok
DROP VIEW view_3_tab4_627

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_628') DROP VIEW view_1_tab0_628

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_628

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_628') DROP VIEW view_2_tab0_628

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_628

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_628') DROP VIEW view_3_tab0_628

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_628

statement ok
CREATE VIEW view_1_tab0_628 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78)

statement ok
CREATE VIEW view_2_tab0_628 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))

statement ok
CREATE VIEW view_3_tab0_628 AS SELECT pk FROM view_1_tab0_628

query II rowsort label-3100-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78)
----

query II rowsort label-3100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab0_628
----

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab0_628
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_628 UNION ALL SELECT pk, col0 FROM view_2_tab0_628
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_628 UNION SELECT pk, col0 FROM view_2_tab0_628
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78) ) AS tab0_628
----

query I rowsort label-3100-3
SELECT * FROM view_3_tab0_628
----

query I rowsort label-3100-3
SELECT pk FROM tab0 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78)
----

statement ok
DROP VIEW view_1_tab0_628

statement ok
DROP VIEW view_2_tab0_628

statement ok
DROP VIEW view_3_tab0_628

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_628') DROP VIEW view_1_tab1_628

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_628

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_628') DROP VIEW view_2_tab1_628

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_628

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_628') DROP VIEW view_3_tab1_628

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_628

statement ok
CREATE VIEW view_1_tab1_628 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78)

statement ok
CREATE VIEW view_2_tab1_628 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))

statement ok
CREATE VIEW view_3_tab1_628 AS SELECT pk FROM view_1_tab1_628

query II rowsort label-3100-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78)
----

query II rowsort label-3100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab1_628
----

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab1_628
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_628 UNION ALL SELECT pk, col0 FROM view_2_tab1_628
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_628 UNION SELECT pk, col0 FROM view_2_tab1_628
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78) ) AS tab1_628
----

query I rowsort label-3100-3
SELECT * FROM view_3_tab1_628
----

query I rowsort label-3100-3
SELECT pk FROM tab1 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78)
----

statement ok
DROP VIEW view_1_tab1_628

statement ok
DROP VIEW view_2_tab1_628

statement ok
DROP VIEW view_3_tab1_628

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_628') DROP VIEW view_1_tab2_628

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_628

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_628') DROP VIEW view_2_tab2_628

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_628

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_628') DROP VIEW view_3_tab2_628

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_628

statement ok
CREATE VIEW view_1_tab2_628 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78)

statement ok
CREATE VIEW view_2_tab2_628 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))

statement ok
CREATE VIEW view_3_tab2_628 AS SELECT pk FROM view_1_tab2_628

query II rowsort label-3100-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78)
----

query II rowsort label-3100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab2_628
----

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab2_628
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_628 UNION ALL SELECT pk, col0 FROM view_2_tab2_628
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_628 UNION SELECT pk, col0 FROM view_2_tab2_628
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78) ) AS tab2_628
----

query I rowsort label-3100-3
SELECT * FROM view_3_tab2_628
----

query I rowsort label-3100-3
SELECT pk FROM tab2 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78)
----

statement ok
DROP VIEW view_1_tab2_628

statement ok
DROP VIEW view_2_tab2_628

statement ok
DROP VIEW view_3_tab2_628

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_628') DROP VIEW view_1_tab3_628

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_628

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_628') DROP VIEW view_2_tab3_628

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_628

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_628') DROP VIEW view_3_tab3_628

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_628

statement ok
CREATE VIEW view_1_tab3_628 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78)

statement ok
CREATE VIEW view_2_tab3_628 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))

statement ok
CREATE VIEW view_3_tab3_628 AS SELECT pk FROM view_1_tab3_628

query II rowsort label-3100-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78)
----

query II rowsort label-3100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab3_628
----

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab3_628
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_628 UNION ALL SELECT pk, col0 FROM view_2_tab3_628
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_628 UNION SELECT pk, col0 FROM view_2_tab3_628
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78) ) AS tab3_628
----

query I rowsort label-3100-3
SELECT * FROM view_3_tab3_628
----

query I rowsort label-3100-3
SELECT pk FROM tab3 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78)
----

statement ok
DROP VIEW view_1_tab3_628

statement ok
DROP VIEW view_2_tab3_628

statement ok
DROP VIEW view_3_tab3_628

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_628') DROP VIEW view_1_tab4_628

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_628

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_628') DROP VIEW view_2_tab4_628

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_628

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_628') DROP VIEW view_3_tab4_628

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_628

statement ok
CREATE VIEW view_1_tab4_628 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78)

statement ok
CREATE VIEW view_2_tab4_628 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))

statement ok
CREATE VIEW view_3_tab4_628 AS SELECT pk FROM view_1_tab4_628

query II rowsort label-3100-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78)
----

query II rowsort label-3100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab4_628
----

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab4_628
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_628 UNION ALL SELECT pk, col0 FROM view_2_tab4_628
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_628 UNION SELECT pk, col0 FROM view_2_tab4_628
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78) ) AS tab4_628
----

query I rowsort label-3100-3
SELECT * FROM view_3_tab4_628
----

query I rowsort label-3100-3
SELECT pk FROM tab4 WHERE col0 >= 745 AND (col1 IS NULL AND ((col3 < 784)) AND col4 >= 824.8 AND col1 <= 442.78)
----

statement ok
DROP VIEW view_1_tab4_628

statement ok
DROP VIEW view_2_tab4_628

statement ok
DROP VIEW view_3_tab4_628

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_629') DROP VIEW view_1_tab0_629

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_629

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_629') DROP VIEW view_2_tab0_629

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_629

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_629') DROP VIEW view_3_tab0_629

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_629

statement ok
CREATE VIEW view_1_tab0_629 AS SELECT pk, col0 FROM tab0 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL)

statement ok
CREATE VIEW view_2_tab0_629 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))

statement ok
CREATE VIEW view_3_tab0_629 AS SELECT pk FROM view_1_tab0_629

query II rowsort label-3200-1
SELECT pk, col0 FROM tab0 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL)
----

query II rowsort label-3200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab0_629
----

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab0_629
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_629 UNION ALL SELECT pk, col0 FROM view_2_tab0_629
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_629 UNION SELECT pk, col0 FROM view_2_tab0_629
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL) ) AS tab0_629
----

query I rowsort label-3200-3
SELECT * FROM view_3_tab0_629
----

query I rowsort label-3200-3
SELECT pk FROM tab0 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL)
----

statement ok
DROP VIEW view_1_tab0_629

statement ok
DROP VIEW view_2_tab0_629

statement ok
DROP VIEW view_3_tab0_629

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_629') DROP VIEW view_1_tab1_629

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_629

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_629') DROP VIEW view_2_tab1_629

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_629

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_629') DROP VIEW view_3_tab1_629

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_629

statement ok
CREATE VIEW view_1_tab1_629 AS SELECT pk, col0 FROM tab1 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL)

statement ok
CREATE VIEW view_2_tab1_629 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))

statement ok
CREATE VIEW view_3_tab1_629 AS SELECT pk FROM view_1_tab1_629

query II rowsort label-3200-1
SELECT pk, col0 FROM tab1 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL)
----

query II rowsort label-3200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab1_629
----

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab1_629
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_629 UNION ALL SELECT pk, col0 FROM view_2_tab1_629
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_629 UNION SELECT pk, col0 FROM view_2_tab1_629
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL) ) AS tab1_629
----

query I rowsort label-3200-3
SELECT * FROM view_3_tab1_629
----

query I rowsort label-3200-3
SELECT pk FROM tab1 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL)
----

statement ok
DROP VIEW view_1_tab1_629

statement ok
DROP VIEW view_2_tab1_629

statement ok
DROP VIEW view_3_tab1_629

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_629') DROP VIEW view_1_tab2_629

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_629

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_629') DROP VIEW view_2_tab2_629

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_629

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_629') DROP VIEW view_3_tab2_629

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_629

statement ok
CREATE VIEW view_1_tab2_629 AS SELECT pk, col0 FROM tab2 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL)

statement ok
CREATE VIEW view_2_tab2_629 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))

statement ok
CREATE VIEW view_3_tab2_629 AS SELECT pk FROM view_1_tab2_629

query II rowsort label-3200-1
SELECT pk, col0 FROM tab2 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL)
----

query II rowsort label-3200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab2_629
----

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab2_629
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_629 UNION ALL SELECT pk, col0 FROM view_2_tab2_629
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_629 UNION SELECT pk, col0 FROM view_2_tab2_629
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL) ) AS tab2_629
----

query I rowsort label-3200-3
SELECT * FROM view_3_tab2_629
----

query I rowsort label-3200-3
SELECT pk FROM tab2 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL)
----

statement ok
DROP VIEW view_1_tab2_629

statement ok
DROP VIEW view_2_tab2_629

statement ok
DROP VIEW view_3_tab2_629

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_629') DROP VIEW view_1_tab3_629

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_629

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_629') DROP VIEW view_2_tab3_629

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_629

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_629') DROP VIEW view_3_tab3_629

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_629

statement ok
CREATE VIEW view_1_tab3_629 AS SELECT pk, col0 FROM tab3 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL)

statement ok
CREATE VIEW view_2_tab3_629 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))

statement ok
CREATE VIEW view_3_tab3_629 AS SELECT pk FROM view_1_tab3_629

query II rowsort label-3200-1
SELECT pk, col0 FROM tab3 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL)
----

query II rowsort label-3200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab3_629
----

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab3_629
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_629 UNION ALL SELECT pk, col0 FROM view_2_tab3_629
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_629 UNION SELECT pk, col0 FROM view_2_tab3_629
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL) ) AS tab3_629
----

query I rowsort label-3200-3
SELECT * FROM view_3_tab3_629
----

query I rowsort label-3200-3
SELECT pk FROM tab3 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL)
----

statement ok
DROP VIEW view_1_tab3_629

statement ok
DROP VIEW view_2_tab3_629

statement ok
DROP VIEW view_3_tab3_629

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_629') DROP VIEW view_1_tab4_629

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_629

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_629') DROP VIEW view_2_tab4_629

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_629

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_629') DROP VIEW view_3_tab4_629

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_629

statement ok
CREATE VIEW view_1_tab4_629 AS SELECT pk, col0 FROM tab4 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL)

statement ok
CREATE VIEW view_2_tab4_629 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))

statement ok
CREATE VIEW view_3_tab4_629 AS SELECT pk FROM view_1_tab4_629

query II rowsort label-3200-1
SELECT pk, col0 FROM tab4 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL)
----

query II rowsort label-3200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab4_629
----

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab4_629
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_629 UNION ALL SELECT pk, col0 FROM view_2_tab4_629
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_629 UNION SELECT pk, col0 FROM view_2_tab4_629
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL) ) AS tab4_629
----

query I rowsort label-3200-3
SELECT * FROM view_3_tab4_629
----

query I rowsort label-3200-3
SELECT pk FROM tab4 WHERE (col4 BETWEEN 408.57 AND 368.80 AND col4 IS NULL AND col0 < 643 OR col3 IS NULL)
----

statement ok
DROP VIEW view_1_tab4_629

statement ok
DROP VIEW view_2_tab4_629

statement ok
DROP VIEW view_3_tab4_629

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_630') DROP VIEW view_1_tab0_630

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_630

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_630') DROP VIEW view_2_tab0_630

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_630

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_630') DROP VIEW view_3_tab0_630

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_630

statement ok
CREATE VIEW view_1_tab0_630 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39

statement ok
CREATE VIEW view_2_tab0_630 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)

statement ok
CREATE VIEW view_3_tab0_630 AS SELECT pk FROM view_1_tab0_630

query II rowsort label-3300-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39
----
80 values hashing to 56bdb38b8efd12bd8103e49208996de0

query II rowsort label-3300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)
----
120 values hashing to 60aa387d99765641f6e98e6c8713a711

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab0_630
----
80 values hashing to 56bdb38b8efd12bd8103e49208996de0

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab0_630
----
120 values hashing to 60aa387d99765641f6e98e6c8713a711

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_630 UNION ALL SELECT pk, col0 FROM view_2_tab0_630
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_630 UNION SELECT pk, col0 FROM view_2_tab0_630
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39 ) AS tab0_630
----
40 values hashing to b694a583e1fc0b1911799484890e8c21

query I rowsort label-3300-3
SELECT * FROM view_3_tab0_630
----
40 values hashing to b694a583e1fc0b1911799484890e8c21

query I rowsort label-3300-3
SELECT pk FROM tab0 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39
----
40 values hashing to b694a583e1fc0b1911799484890e8c21

statement ok
DROP VIEW view_1_tab0_630

statement ok
DROP VIEW view_2_tab0_630

statement ok
DROP VIEW view_3_tab0_630

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_630') DROP VIEW view_1_tab1_630

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_630

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_630') DROP VIEW view_2_tab1_630

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_630

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_630') DROP VIEW view_3_tab1_630

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_630

statement ok
CREATE VIEW view_1_tab1_630 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39

statement ok
CREATE VIEW view_2_tab1_630 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)

statement ok
CREATE VIEW view_3_tab1_630 AS SELECT pk FROM view_1_tab1_630

query II rowsort label-3300-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39
----
80 values hashing to 56bdb38b8efd12bd8103e49208996de0

query II rowsort label-3300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)
----
120 values hashing to 60aa387d99765641f6e98e6c8713a711

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab1_630
----
80 values hashing to 56bdb38b8efd12bd8103e49208996de0

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab1_630
----
120 values hashing to 60aa387d99765641f6e98e6c8713a711

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_630 UNION ALL SELECT pk, col0 FROM view_2_tab1_630
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_630 UNION SELECT pk, col0 FROM view_2_tab1_630
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39 ) AS tab1_630
----
40 values hashing to b694a583e1fc0b1911799484890e8c21

query I rowsort label-3300-3
SELECT * FROM view_3_tab1_630
----
40 values hashing to b694a583e1fc0b1911799484890e8c21

query I rowsort label-3300-3
SELECT pk FROM tab1 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39
----
40 values hashing to b694a583e1fc0b1911799484890e8c21

statement ok
DROP VIEW view_1_tab1_630

statement ok
DROP VIEW view_2_tab1_630

statement ok
DROP VIEW view_3_tab1_630

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_630') DROP VIEW view_1_tab2_630

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_630

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_630') DROP VIEW view_2_tab2_630

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_630

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_630') DROP VIEW view_3_tab2_630

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_630

statement ok
CREATE VIEW view_1_tab2_630 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39

statement ok
CREATE VIEW view_2_tab2_630 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)

statement ok
CREATE VIEW view_3_tab2_630 AS SELECT pk FROM view_1_tab2_630

query II rowsort label-3300-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39
----
80 values hashing to 56bdb38b8efd12bd8103e49208996de0

query II rowsort label-3300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)
----
120 values hashing to 60aa387d99765641f6e98e6c8713a711

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab2_630
----
80 values hashing to 56bdb38b8efd12bd8103e49208996de0

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab2_630
----
120 values hashing to 60aa387d99765641f6e98e6c8713a711

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_630 UNION ALL SELECT pk, col0 FROM view_2_tab2_630
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_630 UNION SELECT pk, col0 FROM view_2_tab2_630
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39 ) AS tab2_630
----
40 values hashing to b694a583e1fc0b1911799484890e8c21

query I rowsort label-3300-3
SELECT * FROM view_3_tab2_630
----
40 values hashing to b694a583e1fc0b1911799484890e8c21

query I rowsort label-3300-3
SELECT pk FROM tab2 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39
----
40 values hashing to b694a583e1fc0b1911799484890e8c21

statement ok
DROP VIEW view_1_tab2_630

statement ok
DROP VIEW view_2_tab2_630

statement ok
DROP VIEW view_3_tab2_630

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_630') DROP VIEW view_1_tab3_630

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_630

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_630') DROP VIEW view_2_tab3_630

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_630

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_630') DROP VIEW view_3_tab3_630

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_630

statement ok
CREATE VIEW view_1_tab3_630 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39

statement ok
CREATE VIEW view_2_tab3_630 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)

statement ok
CREATE VIEW view_3_tab3_630 AS SELECT pk FROM view_1_tab3_630

query II rowsort label-3300-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39
----
80 values hashing to 56bdb38b8efd12bd8103e49208996de0

query II rowsort label-3300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)
----
120 values hashing to 60aa387d99765641f6e98e6c8713a711

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab3_630
----
80 values hashing to 56bdb38b8efd12bd8103e49208996de0

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab3_630
----
120 values hashing to 60aa387d99765641f6e98e6c8713a711

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_630 UNION ALL SELECT pk, col0 FROM view_2_tab3_630
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_630 UNION SELECT pk, col0 FROM view_2_tab3_630
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39 ) AS tab3_630
----
40 values hashing to b694a583e1fc0b1911799484890e8c21

query I rowsort label-3300-3
SELECT * FROM view_3_tab3_630
----
40 values hashing to b694a583e1fc0b1911799484890e8c21

query I rowsort label-3300-3
SELECT pk FROM tab3 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39
----
40 values hashing to b694a583e1fc0b1911799484890e8c21

statement ok
DROP VIEW view_1_tab3_630

statement ok
DROP VIEW view_2_tab3_630

statement ok
DROP VIEW view_3_tab3_630

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_630') DROP VIEW view_1_tab4_630

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_630

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_630') DROP VIEW view_2_tab4_630

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_630

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_630') DROP VIEW view_3_tab4_630

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_630

statement ok
CREATE VIEW view_1_tab4_630 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39

statement ok
CREATE VIEW view_2_tab4_630 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)

statement ok
CREATE VIEW view_3_tab4_630 AS SELECT pk FROM view_1_tab4_630

query II rowsort label-3300-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39
----
80 values hashing to 56bdb38b8efd12bd8103e49208996de0

query II rowsort label-3300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)
----
120 values hashing to 60aa387d99765641f6e98e6c8713a711

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab4_630
----
80 values hashing to 56bdb38b8efd12bd8103e49208996de0

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab4_630
----
120 values hashing to 60aa387d99765641f6e98e6c8713a711

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_630 UNION ALL SELECT pk, col0 FROM view_2_tab4_630
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_630 UNION SELECT pk, col0 FROM view_2_tab4_630
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39 ) AS tab4_630
----
40 values hashing to b694a583e1fc0b1911799484890e8c21

query I rowsort label-3300-3
SELECT * FROM view_3_tab4_630
----
40 values hashing to b694a583e1fc0b1911799484890e8c21

query I rowsort label-3300-3
SELECT pk FROM tab4 WHERE col0 <= 161 AND ((col3 > 572)) OR col1 > 635.39
----
40 values hashing to b694a583e1fc0b1911799484890e8c21

statement ok
DROP VIEW view_1_tab4_630

statement ok
DROP VIEW view_2_tab4_630

statement ok
DROP VIEW view_3_tab4_630

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_631') DROP VIEW view_1_tab0_631

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_631

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_631') DROP VIEW view_2_tab0_631

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_631

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_631') DROP VIEW view_3_tab0_631

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_631

statement ok
CREATE VIEW view_1_tab0_631 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759

statement ok
CREATE VIEW view_2_tab0_631 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)

statement ok
CREATE VIEW view_3_tab0_631 AS SELECT pk FROM view_1_tab0_631

query II rowsort label-3400-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759
----
128 values hashing to e9da61ec796edac7747c9c9468d09f08

query II rowsort label-3400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)
----
72 values hashing to 9a578efcced6f9f8816e9dc5030ef337

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab0_631
----
128 values hashing to e9da61ec796edac7747c9c9468d09f08

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab0_631
----
72 values hashing to 9a578efcced6f9f8816e9dc5030ef337

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_631 UNION ALL SELECT pk, col0 FROM view_2_tab0_631
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_631 UNION SELECT pk, col0 FROM view_2_tab0_631
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759 ) AS tab0_631
----
64 values hashing to ee203217c66e05d8720780de81b329da

query I rowsort label-3400-3
SELECT * FROM view_3_tab0_631
----
64 values hashing to ee203217c66e05d8720780de81b329da

query I rowsort label-3400-3
SELECT pk FROM tab0 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759
----
64 values hashing to ee203217c66e05d8720780de81b329da

statement ok
DROP VIEW view_1_tab0_631

statement ok
DROP VIEW view_2_tab0_631

statement ok
DROP VIEW view_3_tab0_631

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_631') DROP VIEW view_1_tab1_631

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_631

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_631') DROP VIEW view_2_tab1_631

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_631

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_631') DROP VIEW view_3_tab1_631

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_631

statement ok
CREATE VIEW view_1_tab1_631 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759

statement ok
CREATE VIEW view_2_tab1_631 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)

statement ok
CREATE VIEW view_3_tab1_631 AS SELECT pk FROM view_1_tab1_631

query II rowsort label-3400-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759
----
128 values hashing to e9da61ec796edac7747c9c9468d09f08

query II rowsort label-3400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)
----
72 values hashing to 9a578efcced6f9f8816e9dc5030ef337

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab1_631
----
128 values hashing to e9da61ec796edac7747c9c9468d09f08

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab1_631
----
72 values hashing to 9a578efcced6f9f8816e9dc5030ef337

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_631 UNION ALL SELECT pk, col0 FROM view_2_tab1_631
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_631 UNION SELECT pk, col0 FROM view_2_tab1_631
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759 ) AS tab1_631
----
64 values hashing to ee203217c66e05d8720780de81b329da

query I rowsort label-3400-3
SELECT * FROM view_3_tab1_631
----
64 values hashing to ee203217c66e05d8720780de81b329da

query I rowsort label-3400-3
SELECT pk FROM tab1 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759
----
64 values hashing to ee203217c66e05d8720780de81b329da

statement ok
DROP VIEW view_1_tab1_631

statement ok
DROP VIEW view_2_tab1_631

statement ok
DROP VIEW view_3_tab1_631

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_631') DROP VIEW view_1_tab2_631

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_631

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_631') DROP VIEW view_2_tab2_631

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_631

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_631') DROP VIEW view_3_tab2_631

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_631

statement ok
CREATE VIEW view_1_tab2_631 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759

statement ok
CREATE VIEW view_2_tab2_631 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)

statement ok
CREATE VIEW view_3_tab2_631 AS SELECT pk FROM view_1_tab2_631

query II rowsort label-3400-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759
----
128 values hashing to e9da61ec796edac7747c9c9468d09f08

query II rowsort label-3400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)
----
72 values hashing to 9a578efcced6f9f8816e9dc5030ef337

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab2_631
----
128 values hashing to e9da61ec796edac7747c9c9468d09f08

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab2_631
----
72 values hashing to 9a578efcced6f9f8816e9dc5030ef337

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_631 UNION ALL SELECT pk, col0 FROM view_2_tab2_631
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_631 UNION SELECT pk, col0 FROM view_2_tab2_631
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759 ) AS tab2_631
----
64 values hashing to ee203217c66e05d8720780de81b329da

query I rowsort label-3400-3
SELECT * FROM view_3_tab2_631
----
64 values hashing to ee203217c66e05d8720780de81b329da

query I rowsort label-3400-3
SELECT pk FROM tab2 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759
----
64 values hashing to ee203217c66e05d8720780de81b329da

statement ok
DROP VIEW view_1_tab2_631

statement ok
DROP VIEW view_2_tab2_631

statement ok
DROP VIEW view_3_tab2_631

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_631') DROP VIEW view_1_tab3_631

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_631

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_631') DROP VIEW view_2_tab3_631

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_631

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_631') DROP VIEW view_3_tab3_631

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_631

statement ok
CREATE VIEW view_1_tab3_631 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759

statement ok
CREATE VIEW view_2_tab3_631 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)

statement ok
CREATE VIEW view_3_tab3_631 AS SELECT pk FROM view_1_tab3_631

query II rowsort label-3400-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759
----
128 values hashing to e9da61ec796edac7747c9c9468d09f08

query II rowsort label-3400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)
----
72 values hashing to 9a578efcced6f9f8816e9dc5030ef337

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab3_631
----
128 values hashing to e9da61ec796edac7747c9c9468d09f08

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab3_631
----
72 values hashing to 9a578efcced6f9f8816e9dc5030ef337

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_631 UNION ALL SELECT pk, col0 FROM view_2_tab3_631
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_631 UNION SELECT pk, col0 FROM view_2_tab3_631
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759 ) AS tab3_631
----
64 values hashing to ee203217c66e05d8720780de81b329da

query I rowsort label-3400-3
SELECT * FROM view_3_tab3_631
----
64 values hashing to ee203217c66e05d8720780de81b329da

query I rowsort label-3400-3
SELECT pk FROM tab3 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759
----
64 values hashing to ee203217c66e05d8720780de81b329da

statement ok
DROP VIEW view_1_tab3_631

statement ok
DROP VIEW view_2_tab3_631

statement ok
DROP VIEW view_3_tab3_631

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_631') DROP VIEW view_1_tab4_631

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_631

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_631') DROP VIEW view_2_tab4_631

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_631

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_631') DROP VIEW view_3_tab4_631

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_631

statement ok
CREATE VIEW view_1_tab4_631 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759

statement ok
CREATE VIEW view_2_tab4_631 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)

statement ok
CREATE VIEW view_3_tab4_631 AS SELECT pk FROM view_1_tab4_631

query II rowsort label-3400-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759
----
128 values hashing to e9da61ec796edac7747c9c9468d09f08

query II rowsort label-3400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)
----
72 values hashing to 9a578efcced6f9f8816e9dc5030ef337

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab4_631
----
128 values hashing to e9da61ec796edac7747c9c9468d09f08

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab4_631
----
72 values hashing to 9a578efcced6f9f8816e9dc5030ef337

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_631 UNION ALL SELECT pk, col0 FROM view_2_tab4_631
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_631 UNION SELECT pk, col0 FROM view_2_tab4_631
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759 ) AS tab4_631
----
64 values hashing to ee203217c66e05d8720780de81b329da

query I rowsort label-3400-3
SELECT * FROM view_3_tab4_631
----
64 values hashing to ee203217c66e05d8720780de81b329da

query I rowsort label-3400-3
SELECT pk FROM tab4 WHERE col3 >= 301 OR col0 = 429 OR col3 BETWEEN 876 AND 759
----
64 values hashing to ee203217c66e05d8720780de81b329da

statement ok
DROP VIEW view_1_tab4_631

statement ok
DROP VIEW view_2_tab4_631

statement ok
DROP VIEW view_3_tab4_631

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_632') DROP VIEW view_1_tab0_632

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_632

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_632') DROP VIEW view_2_tab0_632

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_632

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_632') DROP VIEW view_3_tab0_632

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_632

statement ok
CREATE VIEW view_1_tab0_632 AS SELECT pk, col0 FROM tab0 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab0 WHERE col0 = 683)))))

statement ok
CREATE VIEW view_2_tab0_632 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab0 WHERE col0 = 683))))))

statement ok
CREATE VIEW view_3_tab0_632 AS SELECT pk FROM view_1_tab0_632

query II rowsort label-3500-1
SELECT pk, col0 FROM tab0 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab0 WHERE col0 = 683)))))
----
138 values hashing to c2ba4ca9dbc84d71d81172981b8db197

query II rowsort label-3500-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab0 WHERE col0 = 683))))))
----
62 values hashing to dbf09f9723474ca9baeb912bf3994887

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab0_632
----
138 values hashing to c2ba4ca9dbc84d71d81172981b8db197

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab0_632
----
62 values hashing to dbf09f9723474ca9baeb912bf3994887

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab0 WHERE col0 = 683))))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab0 WHERE col0 = 683))))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_632 UNION ALL SELECT pk, col0 FROM view_2_tab0_632
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab0 WHERE col0 = 683))))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab0 WHERE col0 = 683))))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_632 UNION SELECT pk, col0 FROM view_2_tab0_632
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab0 WHERE col0 = 683))))) ) AS tab0_632
----
69 values hashing to 38d3d85b3bff5a5fb75e6a60da24887d

query I rowsort label-3500-3
SELECT * FROM view_3_tab0_632
----
69 values hashing to 38d3d85b3bff5a5fb75e6a60da24887d

query I rowsort label-3500-3
SELECT pk FROM tab0 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab0 WHERE col0 = 683)))))
----
69 values hashing to 38d3d85b3bff5a5fb75e6a60da24887d

statement ok
DROP VIEW view_1_tab0_632

statement ok
DROP VIEW view_2_tab0_632

statement ok
DROP VIEW view_3_tab0_632

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_632') DROP VIEW view_1_tab1_632

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_632

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_632') DROP VIEW view_2_tab1_632

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_632

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_632') DROP VIEW view_3_tab1_632

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_632

statement ok
CREATE VIEW view_1_tab1_632 AS SELECT pk, col0 FROM tab1 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab1 WHERE col0 = 683)))))

statement ok
CREATE VIEW view_2_tab1_632 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab1 WHERE col0 = 683))))))

statement ok
CREATE VIEW view_3_tab1_632 AS SELECT pk FROM view_1_tab1_632

query II rowsort label-3500-1
SELECT pk, col0 FROM tab1 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab1 WHERE col0 = 683)))))
----
138 values hashing to c2ba4ca9dbc84d71d81172981b8db197

query II rowsort label-3500-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab1 WHERE col0 = 683))))))
----
62 values hashing to dbf09f9723474ca9baeb912bf3994887

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab1_632
----
138 values hashing to c2ba4ca9dbc84d71d81172981b8db197

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab1_632
----
62 values hashing to dbf09f9723474ca9baeb912bf3994887

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab1 WHERE col0 = 683))))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab1 WHERE col0 = 683))))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_632 UNION ALL SELECT pk, col0 FROM view_2_tab1_632
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab1 WHERE col0 = 683))))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab1 WHERE col0 = 683))))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_632 UNION SELECT pk, col0 FROM view_2_tab1_632
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab1 WHERE col0 = 683))))) ) AS tab1_632
----
69 values hashing to 38d3d85b3bff5a5fb75e6a60da24887d

query I rowsort label-3500-3
SELECT * FROM view_3_tab1_632
----
69 values hashing to 38d3d85b3bff5a5fb75e6a60da24887d

query I rowsort label-3500-3
SELECT pk FROM tab1 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab1 WHERE col0 = 683)))))
----
69 values hashing to 38d3d85b3bff5a5fb75e6a60da24887d

statement ok
DROP VIEW view_1_tab1_632

statement ok
DROP VIEW view_2_tab1_632

statement ok
DROP VIEW view_3_tab1_632

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_632') DROP VIEW view_1_tab2_632

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_632

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_632') DROP VIEW view_2_tab2_632

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_632

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_632') DROP VIEW view_3_tab2_632

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_632

statement ok
CREATE VIEW view_1_tab2_632 AS SELECT pk, col0 FROM tab2 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab2 WHERE col0 = 683)))))

statement ok
CREATE VIEW view_2_tab2_632 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab2 WHERE col0 = 683))))))

statement ok
CREATE VIEW view_3_tab2_632 AS SELECT pk FROM view_1_tab2_632

query II rowsort label-3500-1
SELECT pk, col0 FROM tab2 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab2 WHERE col0 = 683)))))
----
138 values hashing to c2ba4ca9dbc84d71d81172981b8db197

query II rowsort label-3500-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab2 WHERE col0 = 683))))))
----
62 values hashing to dbf09f9723474ca9baeb912bf3994887

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab2_632
----
138 values hashing to c2ba4ca9dbc84d71d81172981b8db197

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab2_632
----
62 values hashing to dbf09f9723474ca9baeb912bf3994887

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab2 WHERE col0 = 683))))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab2 WHERE col0 = 683))))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_632 UNION ALL SELECT pk, col0 FROM view_2_tab2_632
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab2 WHERE col0 = 683))))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab2 WHERE col0 = 683))))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_632 UNION SELECT pk, col0 FROM view_2_tab2_632
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab2 WHERE col0 = 683))))) ) AS tab2_632
----
69 values hashing to 38d3d85b3bff5a5fb75e6a60da24887d

query I rowsort label-3500-3
SELECT * FROM view_3_tab2_632
----
69 values hashing to 38d3d85b3bff5a5fb75e6a60da24887d

query I rowsort label-3500-3
SELECT pk FROM tab2 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab2 WHERE col0 = 683)))))
----
69 values hashing to 38d3d85b3bff5a5fb75e6a60da24887d

statement ok
DROP VIEW view_1_tab2_632

statement ok
DROP VIEW view_2_tab2_632

statement ok
DROP VIEW view_3_tab2_632

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_632') DROP VIEW view_1_tab3_632

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_632

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_632') DROP VIEW view_2_tab3_632

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_632

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_632') DROP VIEW view_3_tab3_632

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_632

statement ok
CREATE VIEW view_1_tab3_632 AS SELECT pk, col0 FROM tab3 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab3 WHERE col0 = 683)))))

statement ok
CREATE VIEW view_2_tab3_632 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab3 WHERE col0 = 683))))))

statement ok
CREATE VIEW view_3_tab3_632 AS SELECT pk FROM view_1_tab3_632

query II rowsort label-3500-1
SELECT pk, col0 FROM tab3 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab3 WHERE col0 = 683)))))
----
138 values hashing to c2ba4ca9dbc84d71d81172981b8db197

query II rowsort label-3500-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab3 WHERE col0 = 683))))))
----
62 values hashing to dbf09f9723474ca9baeb912bf3994887

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab3_632
----
138 values hashing to c2ba4ca9dbc84d71d81172981b8db197

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab3_632
----
62 values hashing to dbf09f9723474ca9baeb912bf3994887

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab3 WHERE col0 = 683))))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab3 WHERE col0 = 683))))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_632 UNION ALL SELECT pk, col0 FROM view_2_tab3_632
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab3 WHERE col0 = 683))))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab3 WHERE col0 = 683))))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_632 UNION SELECT pk, col0 FROM view_2_tab3_632
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab3 WHERE col0 = 683))))) ) AS tab3_632
----
69 values hashing to 38d3d85b3bff5a5fb75e6a60da24887d

query I rowsort label-3500-3
SELECT * FROM view_3_tab3_632
----
69 values hashing to 38d3d85b3bff5a5fb75e6a60da24887d

query I rowsort label-3500-3
SELECT pk FROM tab3 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab3 WHERE col0 = 683)))))
----
69 values hashing to 38d3d85b3bff5a5fb75e6a60da24887d

statement ok
DROP VIEW view_1_tab3_632

statement ok
DROP VIEW view_2_tab3_632

statement ok
DROP VIEW view_3_tab3_632

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_632') DROP VIEW view_1_tab4_632

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_632

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_632') DROP VIEW view_2_tab4_632

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_632

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_632') DROP VIEW view_3_tab4_632

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_632

statement ok
CREATE VIEW view_1_tab4_632 AS SELECT pk, col0 FROM tab4 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab4 WHERE col0 = 683)))))

statement ok
CREATE VIEW view_2_tab4_632 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab4 WHERE col0 = 683))))))

statement ok
CREATE VIEW view_3_tab4_632 AS SELECT pk FROM view_1_tab4_632

query II rowsort label-3500-1
SELECT pk, col0 FROM tab4 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab4 WHERE col0 = 683)))))
----
138 values hashing to c2ba4ca9dbc84d71d81172981b8db197

query II rowsort label-3500-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab4 WHERE col0 = 683))))))
----
62 values hashing to dbf09f9723474ca9baeb912bf3994887

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab4_632
----
138 values hashing to c2ba4ca9dbc84d71d81172981b8db197

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab4_632
----
62 values hashing to dbf09f9723474ca9baeb912bf3994887

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab4 WHERE col0 = 683))))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab4 WHERE col0 = 683))))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_632 UNION ALL SELECT pk, col0 FROM view_2_tab4_632
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab4 WHERE col0 = 683))))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab4 WHERE col0 = 683))))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_632 UNION SELECT pk, col0 FROM view_2_tab4_632
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab4 WHERE col0 = 683))))) ) AS tab4_632
----
69 values hashing to 38d3d85b3bff5a5fb75e6a60da24887d

query I rowsort label-3500-3
SELECT * FROM view_3_tab4_632
----
69 values hashing to 38d3d85b3bff5a5fb75e6a60da24887d

query I rowsort label-3500-3
SELECT pk FROM tab4 WHERE (col3 >= 597 OR col0 >= 537 AND col3 <= 759 AND (((col4 < 501.94 AND ((col3 IN (173,320,335,951)) AND col3 >= 692) OR (col3 <= 647) AND ((col3 >= 978) AND col1 BETWEEN 205.70 AND 372.30 AND ((col4 < 432.60 OR (((col3 = 195)) OR col3 IN (333,723,340,201) OR col3 <= 843 AND col1 > 211.44 AND col1 = 232.93)))) OR col4 <= 680.29 OR col0 > 655 OR col0 < 303 OR (col4 > 658.51 OR col1 IS NULL OR col3 IN (524,565,741,694,772,77)) AND col0 IN (SELECT col3 FROM tab4 WHERE col0 = 683)))))
----
69 values hashing to 38d3d85b3bff5a5fb75e6a60da24887d

statement ok
DROP VIEW view_1_tab4_632

statement ok
DROP VIEW view_2_tab4_632

statement ok
DROP VIEW view_3_tab4_632

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_633') DROP VIEW view_1_tab0_633

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_633

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_633') DROP VIEW view_2_tab0_633

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_633

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_633') DROP VIEW view_3_tab0_633

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_633

statement ok
CREATE VIEW view_1_tab0_633 AS SELECT pk, col0 FROM tab0 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844

statement ok
CREATE VIEW view_2_tab0_633 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)

statement ok
CREATE VIEW view_3_tab0_633 AS SELECT pk FROM view_1_tab0_633

query II rowsort label-3600-1
SELECT pk, col0 FROM tab0 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844
----
46 values hashing to 3534766be563bea13b75193894ee437f

query II rowsort label-3600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)
----
154 values hashing to 69767231c5bb1a63a8b605d88f1af16a

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab0_633
----
46 values hashing to 3534766be563bea13b75193894ee437f

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab0_633
----
154 values hashing to 69767231c5bb1a63a8b605d88f1af16a

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_633 UNION ALL SELECT pk, col0 FROM view_2_tab0_633
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_633 UNION SELECT pk, col0 FROM view_2_tab0_633
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844 ) AS tab0_633
----
23 values hashing to 639c5584abd6fa415762c3b8d2d6225b

query I rowsort label-3600-3
SELECT * FROM view_3_tab0_633
----
23 values hashing to 639c5584abd6fa415762c3b8d2d6225b

query I rowsort label-3600-3
SELECT pk FROM tab0 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844
----
23 values hashing to 639c5584abd6fa415762c3b8d2d6225b

statement ok
DROP VIEW view_1_tab0_633

statement ok
DROP VIEW view_2_tab0_633

statement ok
DROP VIEW view_3_tab0_633

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_633') DROP VIEW view_1_tab1_633

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_633

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_633') DROP VIEW view_2_tab1_633

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_633

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_633') DROP VIEW view_3_tab1_633

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_633

statement ok
CREATE VIEW view_1_tab1_633 AS SELECT pk, col0 FROM tab1 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844

statement ok
CREATE VIEW view_2_tab1_633 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)

statement ok
CREATE VIEW view_3_tab1_633 AS SELECT pk FROM view_1_tab1_633

query II rowsort label-3600-1
SELECT pk, col0 FROM tab1 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844
----
46 values hashing to 3534766be563bea13b75193894ee437f

query II rowsort label-3600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)
----
154 values hashing to 69767231c5bb1a63a8b605d88f1af16a

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab1_633
----
46 values hashing to 3534766be563bea13b75193894ee437f

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab1_633
----
154 values hashing to 69767231c5bb1a63a8b605d88f1af16a

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_633 UNION ALL SELECT pk, col0 FROM view_2_tab1_633
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_633 UNION SELECT pk, col0 FROM view_2_tab1_633
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844 ) AS tab1_633
----
23 values hashing to 639c5584abd6fa415762c3b8d2d6225b

query I rowsort label-3600-3
SELECT * FROM view_3_tab1_633
----
23 values hashing to 639c5584abd6fa415762c3b8d2d6225b

query I rowsort label-3600-3
SELECT pk FROM tab1 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844
----
23 values hashing to 639c5584abd6fa415762c3b8d2d6225b

statement ok
DROP VIEW view_1_tab1_633

statement ok
DROP VIEW view_2_tab1_633

statement ok
DROP VIEW view_3_tab1_633

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_633') DROP VIEW view_1_tab2_633

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_633

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_633') DROP VIEW view_2_tab2_633

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_633

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_633') DROP VIEW view_3_tab2_633

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_633

statement ok
CREATE VIEW view_1_tab2_633 AS SELECT pk, col0 FROM tab2 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844

statement ok
CREATE VIEW view_2_tab2_633 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)

statement ok
CREATE VIEW view_3_tab2_633 AS SELECT pk FROM view_1_tab2_633

query II rowsort label-3600-1
SELECT pk, col0 FROM tab2 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844
----
46 values hashing to 3534766be563bea13b75193894ee437f

query II rowsort label-3600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)
----
154 values hashing to 69767231c5bb1a63a8b605d88f1af16a

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab2_633
----
46 values hashing to 3534766be563bea13b75193894ee437f

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab2_633
----
154 values hashing to 69767231c5bb1a63a8b605d88f1af16a

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_633 UNION ALL SELECT pk, col0 FROM view_2_tab2_633
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_633 UNION SELECT pk, col0 FROM view_2_tab2_633
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844 ) AS tab2_633
----
23 values hashing to 639c5584abd6fa415762c3b8d2d6225b

query I rowsort label-3600-3
SELECT * FROM view_3_tab2_633
----
23 values hashing to 639c5584abd6fa415762c3b8d2d6225b

query I rowsort label-3600-3
SELECT pk FROM tab2 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844
----
23 values hashing to 639c5584abd6fa415762c3b8d2d6225b

statement ok
DROP VIEW view_1_tab2_633

statement ok
DROP VIEW view_2_tab2_633

statement ok
DROP VIEW view_3_tab2_633

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_633') DROP VIEW view_1_tab3_633

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_633

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_633') DROP VIEW view_2_tab3_633

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_633

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_633') DROP VIEW view_3_tab3_633

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_633

statement ok
CREATE VIEW view_1_tab3_633 AS SELECT pk, col0 FROM tab3 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844

statement ok
CREATE VIEW view_2_tab3_633 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)

statement ok
CREATE VIEW view_3_tab3_633 AS SELECT pk FROM view_1_tab3_633

query II rowsort label-3600-1
SELECT pk, col0 FROM tab3 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844
----
46 values hashing to 3534766be563bea13b75193894ee437f

query II rowsort label-3600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)
----
154 values hashing to 69767231c5bb1a63a8b605d88f1af16a

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab3_633
----
46 values hashing to 3534766be563bea13b75193894ee437f

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab3_633
----
154 values hashing to 69767231c5bb1a63a8b605d88f1af16a

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_633 UNION ALL SELECT pk, col0 FROM view_2_tab3_633
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_633 UNION SELECT pk, col0 FROM view_2_tab3_633
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844 ) AS tab3_633
----
23 values hashing to 639c5584abd6fa415762c3b8d2d6225b

query I rowsort label-3600-3
SELECT * FROM view_3_tab3_633
----
23 values hashing to 639c5584abd6fa415762c3b8d2d6225b

query I rowsort label-3600-3
SELECT pk FROM tab3 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844
----
23 values hashing to 639c5584abd6fa415762c3b8d2d6225b

statement ok
DROP VIEW view_1_tab3_633

statement ok
DROP VIEW view_2_tab3_633

statement ok
DROP VIEW view_3_tab3_633

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_633') DROP VIEW view_1_tab4_633

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_633

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_633') DROP VIEW view_2_tab4_633

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_633

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_633') DROP VIEW view_3_tab4_633

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_633

statement ok
CREATE VIEW view_1_tab4_633 AS SELECT pk, col0 FROM tab4 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844

statement ok
CREATE VIEW view_2_tab4_633 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)

statement ok
CREATE VIEW view_3_tab4_633 AS SELECT pk FROM view_1_tab4_633

query II rowsort label-3600-1
SELECT pk, col0 FROM tab4 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844
----
46 values hashing to 3534766be563bea13b75193894ee437f

query II rowsort label-3600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)
----
154 values hashing to 69767231c5bb1a63a8b605d88f1af16a

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab4_633
----
46 values hashing to 3534766be563bea13b75193894ee437f

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab4_633
----
154 values hashing to 69767231c5bb1a63a8b605d88f1af16a

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_633 UNION ALL SELECT pk, col0 FROM view_2_tab4_633
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_633 UNION SELECT pk, col0 FROM view_2_tab4_633
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844 ) AS tab4_633
----
23 values hashing to 639c5584abd6fa415762c3b8d2d6225b

query I rowsort label-3600-3
SELECT * FROM view_3_tab4_633
----
23 values hashing to 639c5584abd6fa415762c3b8d2d6225b

query I rowsort label-3600-3
SELECT pk FROM tab4 WHERE col1 <= 108.74 OR ((col0 <= 34)) OR col0 >= 844
----
23 values hashing to 639c5584abd6fa415762c3b8d2d6225b

statement ok
DROP VIEW view_1_tab4_633

statement ok
DROP VIEW view_2_tab4_633

statement ok
DROP VIEW view_3_tab4_633

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_634') DROP VIEW view_1_tab0_634

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_634

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_634') DROP VIEW view_2_tab0_634

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_634

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_634') DROP VIEW view_3_tab0_634

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_634

statement ok
CREATE VIEW view_1_tab0_634 AS SELECT pk, col0 FROM tab0 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548))

statement ok
CREATE VIEW view_2_tab0_634 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))

statement ok
CREATE VIEW view_3_tab0_634 AS SELECT pk FROM view_1_tab0_634

query II rowsort label-3700-1
SELECT pk, col0 FROM tab0 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548))
----
138 values hashing to 8f85ee82191230ab8b97c4ca94a19a20

query II rowsort label-3700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))
----
62 values hashing to 19b54fa22b59fe2161b4b9c19ecf35f9

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab0_634
----
138 values hashing to 8f85ee82191230ab8b97c4ca94a19a20

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab0_634
----
62 values hashing to 19b54fa22b59fe2161b4b9c19ecf35f9

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_634 UNION ALL SELECT pk, col0 FROM view_2_tab0_634
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_634 UNION SELECT pk, col0 FROM view_2_tab0_634
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)) ) AS tab0_634
----
69 values hashing to 6dc1b417afed563e50b2c47ba8f26528

query I rowsort label-3700-3
SELECT * FROM view_3_tab0_634
----
69 values hashing to 6dc1b417afed563e50b2c47ba8f26528

query I rowsort label-3700-3
SELECT pk FROM tab0 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548))
----
69 values hashing to 6dc1b417afed563e50b2c47ba8f26528

statement ok
DROP VIEW view_1_tab0_634

statement ok
DROP VIEW view_2_tab0_634

statement ok
DROP VIEW view_3_tab0_634

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_634') DROP VIEW view_1_tab1_634

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_634

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_634') DROP VIEW view_2_tab1_634

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_634

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_634') DROP VIEW view_3_tab1_634

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_634

statement ok
CREATE VIEW view_1_tab1_634 AS SELECT pk, col0 FROM tab1 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548))

statement ok
CREATE VIEW view_2_tab1_634 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))

statement ok
CREATE VIEW view_3_tab1_634 AS SELECT pk FROM view_1_tab1_634

query II rowsort label-3700-1
SELECT pk, col0 FROM tab1 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548))
----
138 values hashing to 8f85ee82191230ab8b97c4ca94a19a20

query II rowsort label-3700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))
----
62 values hashing to 19b54fa22b59fe2161b4b9c19ecf35f9

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab1_634
----
138 values hashing to 8f85ee82191230ab8b97c4ca94a19a20

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab1_634
----
62 values hashing to 19b54fa22b59fe2161b4b9c19ecf35f9

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_634 UNION ALL SELECT pk, col0 FROM view_2_tab1_634
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_634 UNION SELECT pk, col0 FROM view_2_tab1_634
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)) ) AS tab1_634
----
69 values hashing to 6dc1b417afed563e50b2c47ba8f26528

query I rowsort label-3700-3
SELECT * FROM view_3_tab1_634
----
69 values hashing to 6dc1b417afed563e50b2c47ba8f26528

query I rowsort label-3700-3
SELECT pk FROM tab1 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548))
----
69 values hashing to 6dc1b417afed563e50b2c47ba8f26528

statement ok
DROP VIEW view_1_tab1_634

statement ok
DROP VIEW view_2_tab1_634

statement ok
DROP VIEW view_3_tab1_634

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_634') DROP VIEW view_1_tab2_634

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_634

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_634') DROP VIEW view_2_tab2_634

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_634

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_634') DROP VIEW view_3_tab2_634

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_634

statement ok
CREATE VIEW view_1_tab2_634 AS SELECT pk, col0 FROM tab2 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548))

statement ok
CREATE VIEW view_2_tab2_634 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))

statement ok
CREATE VIEW view_3_tab2_634 AS SELECT pk FROM view_1_tab2_634

query II rowsort label-3700-1
SELECT pk, col0 FROM tab2 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548))
----
138 values hashing to 8f85ee82191230ab8b97c4ca94a19a20

query II rowsort label-3700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))
----
62 values hashing to 19b54fa22b59fe2161b4b9c19ecf35f9

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab2_634
----
138 values hashing to 8f85ee82191230ab8b97c4ca94a19a20

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab2_634
----
62 values hashing to 19b54fa22b59fe2161b4b9c19ecf35f9

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_634 UNION ALL SELECT pk, col0 FROM view_2_tab2_634
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_634 UNION SELECT pk, col0 FROM view_2_tab2_634
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)) ) AS tab2_634
----
69 values hashing to 6dc1b417afed563e50b2c47ba8f26528

query I rowsort label-3700-3
SELECT * FROM view_3_tab2_634
----
69 values hashing to 6dc1b417afed563e50b2c47ba8f26528

query I rowsort label-3700-3
SELECT pk FROM tab2 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548))
----
69 values hashing to 6dc1b417afed563e50b2c47ba8f26528

statement ok
DROP VIEW view_1_tab2_634

statement ok
DROP VIEW view_2_tab2_634

statement ok
DROP VIEW view_3_tab2_634

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_634') DROP VIEW view_1_tab3_634

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_634

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_634') DROP VIEW view_2_tab3_634

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_634

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_634') DROP VIEW view_3_tab3_634

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_634

statement ok
CREATE VIEW view_1_tab3_634 AS SELECT pk, col0 FROM tab3 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548))

statement ok
CREATE VIEW view_2_tab3_634 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))

statement ok
CREATE VIEW view_3_tab3_634 AS SELECT pk FROM view_1_tab3_634

query II rowsort label-3700-1
SELECT pk, col0 FROM tab3 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548))
----
138 values hashing to 8f85ee82191230ab8b97c4ca94a19a20

query II rowsort label-3700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))
----
62 values hashing to 19b54fa22b59fe2161b4b9c19ecf35f9

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab3_634
----
138 values hashing to 8f85ee82191230ab8b97c4ca94a19a20

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab3_634
----
62 values hashing to 19b54fa22b59fe2161b4b9c19ecf35f9

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_634 UNION ALL SELECT pk, col0 FROM view_2_tab3_634
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_634 UNION SELECT pk, col0 FROM view_2_tab3_634
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)) ) AS tab3_634
----
69 values hashing to 6dc1b417afed563e50b2c47ba8f26528

query I rowsort label-3700-3
SELECT * FROM view_3_tab3_634
----
69 values hashing to 6dc1b417afed563e50b2c47ba8f26528

query I rowsort label-3700-3
SELECT pk FROM tab3 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548))
----
69 values hashing to 6dc1b417afed563e50b2c47ba8f26528

statement ok
DROP VIEW view_1_tab3_634

statement ok
DROP VIEW view_2_tab3_634

statement ok
DROP VIEW view_3_tab3_634

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_634') DROP VIEW view_1_tab4_634

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_634

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_634') DROP VIEW view_2_tab4_634

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_634

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_634') DROP VIEW view_3_tab4_634

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_634

statement ok
CREATE VIEW view_1_tab4_634 AS SELECT pk, col0 FROM tab4 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548))

statement ok
CREATE VIEW view_2_tab4_634 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))

statement ok
CREATE VIEW view_3_tab4_634 AS SELECT pk FROM view_1_tab4_634

query II rowsort label-3700-1
SELECT pk, col0 FROM tab4 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548))
----
138 values hashing to 8f85ee82191230ab8b97c4ca94a19a20

query II rowsort label-3700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))
----
62 values hashing to 19b54fa22b59fe2161b4b9c19ecf35f9

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab4_634
----
138 values hashing to 8f85ee82191230ab8b97c4ca94a19a20

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab4_634
----
62 values hashing to 19b54fa22b59fe2161b4b9c19ecf35f9

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_634 UNION ALL SELECT pk, col0 FROM view_2_tab4_634
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_634 UNION SELECT pk, col0 FROM view_2_tab4_634
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548)) ) AS tab4_634
----
69 values hashing to 6dc1b417afed563e50b2c47ba8f26528

query I rowsort label-3700-3
SELECT * FROM view_3_tab4_634
----
69 values hashing to 6dc1b417afed563e50b2c47ba8f26528

query I rowsort label-3700-3
SELECT pk FROM tab4 WHERE col3 < 934 AND col4 < 836.19 AND ((col3 > 574)) AND col0 > 647 OR ((col3 <= 548))
----
69 values hashing to 6dc1b417afed563e50b2c47ba8f26528

statement ok
DROP VIEW view_1_tab4_634

statement ok
DROP VIEW view_2_tab4_634

statement ok
DROP VIEW view_3_tab4_634

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_635') DROP VIEW view_1_tab0_635

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_635

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_635') DROP VIEW view_2_tab0_635

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_635

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_635') DROP VIEW view_3_tab0_635

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_635

statement ok
CREATE VIEW view_1_tab0_635 AS SELECT pk, col0 FROM tab0 WHERE col1 < 273.10

statement ok
CREATE VIEW view_2_tab0_635 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 273.10)

statement ok
CREATE VIEW view_3_tab0_635 AS SELECT pk FROM view_1_tab0_635

query II rowsort label-3800-1
SELECT pk, col0 FROM tab0 WHERE col1 < 273.10
----
58 values hashing to 49a82acec4ab49b50a630c70e2cf963a

query II rowsort label-3800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 273.10)
----
142 values hashing to 2c5b2deb66a4a8ed291826b0de3e5d37

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab0_635
----
58 values hashing to 49a82acec4ab49b50a630c70e2cf963a

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab0_635
----
142 values hashing to 2c5b2deb66a4a8ed291826b0de3e5d37

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 < 273.10 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 273.10)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_635 UNION ALL SELECT pk, col0 FROM view_2_tab0_635
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 < 273.10 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 273.10)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_635 UNION SELECT pk, col0 FROM view_2_tab0_635
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 < 273.10 ) AS tab0_635
----
29 values hashing to 1406005fef04005ab5cc63728dc80243

query I rowsort label-3800-3
SELECT * FROM view_3_tab0_635
----
29 values hashing to 1406005fef04005ab5cc63728dc80243

query I rowsort label-3800-3
SELECT pk FROM tab0 WHERE col1 < 273.10
----
29 values hashing to 1406005fef04005ab5cc63728dc80243

statement ok
DROP VIEW view_1_tab0_635

statement ok
DROP VIEW view_2_tab0_635

statement ok
DROP VIEW view_3_tab0_635

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_635') DROP VIEW view_1_tab1_635

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_635

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_635') DROP VIEW view_2_tab1_635

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_635

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_635') DROP VIEW view_3_tab1_635

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_635

statement ok
CREATE VIEW view_1_tab1_635 AS SELECT pk, col0 FROM tab1 WHERE col1 < 273.10

statement ok
CREATE VIEW view_2_tab1_635 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 273.10)

statement ok
CREATE VIEW view_3_tab1_635 AS SELECT pk FROM view_1_tab1_635

query II rowsort label-3800-1
SELECT pk, col0 FROM tab1 WHERE col1 < 273.10
----
58 values hashing to 49a82acec4ab49b50a630c70e2cf963a

query II rowsort label-3800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 273.10)
----
142 values hashing to 2c5b2deb66a4a8ed291826b0de3e5d37

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab1_635
----
58 values hashing to 49a82acec4ab49b50a630c70e2cf963a

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab1_635
----
142 values hashing to 2c5b2deb66a4a8ed291826b0de3e5d37

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 < 273.10 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 273.10)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_635 UNION ALL SELECT pk, col0 FROM view_2_tab1_635
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 < 273.10 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 273.10)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_635 UNION SELECT pk, col0 FROM view_2_tab1_635
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 < 273.10 ) AS tab1_635
----
29 values hashing to 1406005fef04005ab5cc63728dc80243

query I rowsort label-3800-3
SELECT * FROM view_3_tab1_635
----
29 values hashing to 1406005fef04005ab5cc63728dc80243

query I rowsort label-3800-3
SELECT pk FROM tab1 WHERE col1 < 273.10
----
29 values hashing to 1406005fef04005ab5cc63728dc80243

statement ok
DROP VIEW view_1_tab1_635

statement ok
DROP VIEW view_2_tab1_635

statement ok
DROP VIEW view_3_tab1_635

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_635') DROP VIEW view_1_tab2_635

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_635

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_635') DROP VIEW view_2_tab2_635

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_635

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_635') DROP VIEW view_3_tab2_635

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_635

statement ok
CREATE VIEW view_1_tab2_635 AS SELECT pk, col0 FROM tab2 WHERE col1 < 273.10

statement ok
CREATE VIEW view_2_tab2_635 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 273.10)

statement ok
CREATE VIEW view_3_tab2_635 AS SELECT pk FROM view_1_tab2_635

query II rowsort label-3800-1
SELECT pk, col0 FROM tab2 WHERE col1 < 273.10
----
58 values hashing to 49a82acec4ab49b50a630c70e2cf963a

query II rowsort label-3800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 273.10)
----
142 values hashing to 2c5b2deb66a4a8ed291826b0de3e5d37

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab2_635
----
58 values hashing to 49a82acec4ab49b50a630c70e2cf963a

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab2_635
----
142 values hashing to 2c5b2deb66a4a8ed291826b0de3e5d37

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 < 273.10 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 273.10)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_635 UNION ALL SELECT pk, col0 FROM view_2_tab2_635
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 < 273.10 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 273.10)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_635 UNION SELECT pk, col0 FROM view_2_tab2_635
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 < 273.10 ) AS tab2_635
----
29 values hashing to 1406005fef04005ab5cc63728dc80243

query I rowsort label-3800-3
SELECT * FROM view_3_tab2_635
----
29 values hashing to 1406005fef04005ab5cc63728dc80243

query I rowsort label-3800-3
SELECT pk FROM tab2 WHERE col1 < 273.10
----
29 values hashing to 1406005fef04005ab5cc63728dc80243

statement ok
DROP VIEW view_1_tab2_635

statement ok
DROP VIEW view_2_tab2_635

statement ok
DROP VIEW view_3_tab2_635

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_635') DROP VIEW view_1_tab3_635

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_635

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_635') DROP VIEW view_2_tab3_635

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_635

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_635') DROP VIEW view_3_tab3_635

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_635

statement ok
CREATE VIEW view_1_tab3_635 AS SELECT pk, col0 FROM tab3 WHERE col1 < 273.10

statement ok
CREATE VIEW view_2_tab3_635 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 273.10)

statement ok
CREATE VIEW view_3_tab3_635 AS SELECT pk FROM view_1_tab3_635

query II rowsort label-3800-1
SELECT pk, col0 FROM tab3 WHERE col1 < 273.10
----
58 values hashing to 49a82acec4ab49b50a630c70e2cf963a

query II rowsort label-3800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 273.10)
----
142 values hashing to 2c5b2deb66a4a8ed291826b0de3e5d37

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab3_635
----
58 values hashing to 49a82acec4ab49b50a630c70e2cf963a

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab3_635
----
142 values hashing to 2c5b2deb66a4a8ed291826b0de3e5d37

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 < 273.10 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 273.10)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_635 UNION ALL SELECT pk, col0 FROM view_2_tab3_635
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 < 273.10 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 273.10)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_635 UNION SELECT pk, col0 FROM view_2_tab3_635
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 < 273.10 ) AS tab3_635
----
29 values hashing to 1406005fef04005ab5cc63728dc80243

query I rowsort label-3800-3
SELECT * FROM view_3_tab3_635
----
29 values hashing to 1406005fef04005ab5cc63728dc80243

query I rowsort label-3800-3
SELECT pk FROM tab3 WHERE col1 < 273.10
----
29 values hashing to 1406005fef04005ab5cc63728dc80243

statement ok
DROP VIEW view_1_tab3_635

statement ok
DROP VIEW view_2_tab3_635

statement ok
DROP VIEW view_3_tab3_635

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_635') DROP VIEW view_1_tab4_635

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_635

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_635') DROP VIEW view_2_tab4_635

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_635

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_635') DROP VIEW view_3_tab4_635

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_635

statement ok
CREATE VIEW view_1_tab4_635 AS SELECT pk, col0 FROM tab4 WHERE col1 < 273.10

statement ok
CREATE VIEW view_2_tab4_635 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 273.10)

statement ok
CREATE VIEW view_3_tab4_635 AS SELECT pk FROM view_1_tab4_635

query II rowsort label-3800-1
SELECT pk, col0 FROM tab4 WHERE col1 < 273.10
----
58 values hashing to 49a82acec4ab49b50a630c70e2cf963a

query II rowsort label-3800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 273.10)
----
142 values hashing to 2c5b2deb66a4a8ed291826b0de3e5d37

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab4_635
----
58 values hashing to 49a82acec4ab49b50a630c70e2cf963a

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab4_635
----
142 values hashing to 2c5b2deb66a4a8ed291826b0de3e5d37

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 < 273.10 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 273.10)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_635 UNION ALL SELECT pk, col0 FROM view_2_tab4_635
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 < 273.10 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 273.10)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_635 UNION SELECT pk, col0 FROM view_2_tab4_635
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 < 273.10 ) AS tab4_635
----
29 values hashing to 1406005fef04005ab5cc63728dc80243

query I rowsort label-3800-3
SELECT * FROM view_3_tab4_635
----
29 values hashing to 1406005fef04005ab5cc63728dc80243

query I rowsort label-3800-3
SELECT pk FROM tab4 WHERE col1 < 273.10
----
29 values hashing to 1406005fef04005ab5cc63728dc80243

statement ok
DROP VIEW view_1_tab4_635

statement ok
DROP VIEW view_2_tab4_635

statement ok
DROP VIEW view_3_tab4_635

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_636') DROP VIEW view_1_tab0_636

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_636

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_636') DROP VIEW view_2_tab0_636

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_636

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_636') DROP VIEW view_3_tab0_636

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_636

statement ok
CREATE VIEW view_1_tab0_636 AS SELECT pk, col0 FROM tab0 WHERE col4 >= 838.84 OR col0 > 864

statement ok
CREATE VIEW view_2_tab0_636 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 838.84 OR col0 > 864)

statement ok
CREATE VIEW view_3_tab0_636 AS SELECT pk FROM view_1_tab0_636

query II rowsort label-3900-1
SELECT pk, col0 FROM tab0 WHERE col4 >= 838.84 OR col0 > 864
----
54 values hashing to 0bba40eadd5d0a85ca1f797ad361e6e0

query II rowsort label-3900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 838.84 OR col0 > 864)
----
146 values hashing to 64820a2706db65d56ca6179e03ed0cb8

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab0_636
----
54 values hashing to 0bba40eadd5d0a85ca1f797ad361e6e0

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab0_636
----
146 values hashing to 64820a2706db65d56ca6179e03ed0cb8

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 838.84 OR col0 > 864 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 838.84 OR col0 > 864)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_636 UNION ALL SELECT pk, col0 FROM view_2_tab0_636
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 838.84 OR col0 > 864 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 838.84 OR col0 > 864)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_636 UNION SELECT pk, col0 FROM view_2_tab0_636
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 >= 838.84 OR col0 > 864 ) AS tab0_636
----
27 values hashing to 7e644fc9784fa8010b1a5cae8c8b2341

query I rowsort label-3900-3
SELECT * FROM view_3_tab0_636
----
27 values hashing to 7e644fc9784fa8010b1a5cae8c8b2341

query I rowsort label-3900-3
SELECT pk FROM tab0 WHERE col4 >= 838.84 OR col0 > 864
----
27 values hashing to 7e644fc9784fa8010b1a5cae8c8b2341

statement ok
DROP VIEW view_1_tab0_636

statement ok
DROP VIEW view_2_tab0_636

statement ok
DROP VIEW view_3_tab0_636

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_636') DROP VIEW view_1_tab1_636

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_636

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_636') DROP VIEW view_2_tab1_636

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_636

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_636') DROP VIEW view_3_tab1_636

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_636

statement ok
CREATE VIEW view_1_tab1_636 AS SELECT pk, col0 FROM tab1 WHERE col4 >= 838.84 OR col0 > 864

statement ok
CREATE VIEW view_2_tab1_636 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 838.84 OR col0 > 864)

statement ok
CREATE VIEW view_3_tab1_636 AS SELECT pk FROM view_1_tab1_636

query II rowsort label-3900-1
SELECT pk, col0 FROM tab1 WHERE col4 >= 838.84 OR col0 > 864
----
54 values hashing to 0bba40eadd5d0a85ca1f797ad361e6e0

query II rowsort label-3900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 838.84 OR col0 > 864)
----
146 values hashing to 64820a2706db65d56ca6179e03ed0cb8

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab1_636
----
54 values hashing to 0bba40eadd5d0a85ca1f797ad361e6e0

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab1_636
----
146 values hashing to 64820a2706db65d56ca6179e03ed0cb8

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 838.84 OR col0 > 864 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 838.84 OR col0 > 864)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_636 UNION ALL SELECT pk, col0 FROM view_2_tab1_636
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 838.84 OR col0 > 864 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 838.84 OR col0 > 864)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_636 UNION SELECT pk, col0 FROM view_2_tab1_636
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 >= 838.84 OR col0 > 864 ) AS tab1_636
----
27 values hashing to 7e644fc9784fa8010b1a5cae8c8b2341

query I rowsort label-3900-3
SELECT * FROM view_3_tab1_636
----
27 values hashing to 7e644fc9784fa8010b1a5cae8c8b2341

query I rowsort label-3900-3
SELECT pk FROM tab1 WHERE col4 >= 838.84 OR col0 > 864
----
27 values hashing to 7e644fc9784fa8010b1a5cae8c8b2341

statement ok
DROP VIEW view_1_tab1_636

statement ok
DROP VIEW view_2_tab1_636

statement ok
DROP VIEW view_3_tab1_636

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_636') DROP VIEW view_1_tab2_636

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_636

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_636') DROP VIEW view_2_tab2_636

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_636

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_636') DROP VIEW view_3_tab2_636

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_636

statement ok
CREATE VIEW view_1_tab2_636 AS SELECT pk, col0 FROM tab2 WHERE col4 >= 838.84 OR col0 > 864

statement ok
CREATE VIEW view_2_tab2_636 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 838.84 OR col0 > 864)

statement ok
CREATE VIEW view_3_tab2_636 AS SELECT pk FROM view_1_tab2_636

query II rowsort label-3900-1
SELECT pk, col0 FROM tab2 WHERE col4 >= 838.84 OR col0 > 864
----
54 values hashing to 0bba40eadd5d0a85ca1f797ad361e6e0

query II rowsort label-3900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 838.84 OR col0 > 864)
----
146 values hashing to 64820a2706db65d56ca6179e03ed0cb8

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab2_636
----
54 values hashing to 0bba40eadd5d0a85ca1f797ad361e6e0

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab2_636
----
146 values hashing to 64820a2706db65d56ca6179e03ed0cb8

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 838.84 OR col0 > 864 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 838.84 OR col0 > 864)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_636 UNION ALL SELECT pk, col0 FROM view_2_tab2_636
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 838.84 OR col0 > 864 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 838.84 OR col0 > 864)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_636 UNION SELECT pk, col0 FROM view_2_tab2_636
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 >= 838.84 OR col0 > 864 ) AS tab2_636
----
27 values hashing to 7e644fc9784fa8010b1a5cae8c8b2341

query I rowsort label-3900-3
SELECT * FROM view_3_tab2_636
----
27 values hashing to 7e644fc9784fa8010b1a5cae8c8b2341

query I rowsort label-3900-3
SELECT pk FROM tab2 WHERE col4 >= 838.84 OR col0 > 864
----
27 values hashing to 7e644fc9784fa8010b1a5cae8c8b2341

statement ok
DROP VIEW view_1_tab2_636

statement ok
DROP VIEW view_2_tab2_636

statement ok
DROP VIEW view_3_tab2_636

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_636') DROP VIEW view_1_tab3_636

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_636

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_636') DROP VIEW view_2_tab3_636

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_636

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_636') DROP VIEW view_3_tab3_636

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_636

statement ok
CREATE VIEW view_1_tab3_636 AS SELECT pk, col0 FROM tab3 WHERE col4 >= 838.84 OR col0 > 864

statement ok
CREATE VIEW view_2_tab3_636 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 838.84 OR col0 > 864)

statement ok
CREATE VIEW view_3_tab3_636 AS SELECT pk FROM view_1_tab3_636

query II rowsort label-3900-1
SELECT pk, col0 FROM tab3 WHERE col4 >= 838.84 OR col0 > 864
----
54 values hashing to 0bba40eadd5d0a85ca1f797ad361e6e0

query II rowsort label-3900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 838.84 OR col0 > 864)
----
146 values hashing to 64820a2706db65d56ca6179e03ed0cb8

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab3_636
----
54 values hashing to 0bba40eadd5d0a85ca1f797ad361e6e0

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab3_636
----
146 values hashing to 64820a2706db65d56ca6179e03ed0cb8

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 838.84 OR col0 > 864 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 838.84 OR col0 > 864)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_636 UNION ALL SELECT pk, col0 FROM view_2_tab3_636
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 838.84 OR col0 > 864 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 838.84 OR col0 > 864)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_636 UNION SELECT pk, col0 FROM view_2_tab3_636
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 >= 838.84 OR col0 > 864 ) AS tab3_636
----
27 values hashing to 7e644fc9784fa8010b1a5cae8c8b2341

query I rowsort label-3900-3
SELECT * FROM view_3_tab3_636
----
27 values hashing to 7e644fc9784fa8010b1a5cae8c8b2341

query I rowsort label-3900-3
SELECT pk FROM tab3 WHERE col4 >= 838.84 OR col0 > 864
----
27 values hashing to 7e644fc9784fa8010b1a5cae8c8b2341

statement ok
DROP VIEW view_1_tab3_636

statement ok
DROP VIEW view_2_tab3_636

statement ok
DROP VIEW view_3_tab3_636

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_636') DROP VIEW view_1_tab4_636

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_636

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_636') DROP VIEW view_2_tab4_636

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_636

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_636') DROP VIEW view_3_tab4_636

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_636

statement ok
CREATE VIEW view_1_tab4_636 AS SELECT pk, col0 FROM tab4 WHERE col4 >= 838.84 OR col0 > 864

statement ok
CREATE VIEW view_2_tab4_636 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 838.84 OR col0 > 864)

statement ok
CREATE VIEW view_3_tab4_636 AS SELECT pk FROM view_1_tab4_636

query II rowsort label-3900-1
SELECT pk, col0 FROM tab4 WHERE col4 >= 838.84 OR col0 > 864
----
54 values hashing to 0bba40eadd5d0a85ca1f797ad361e6e0

query II rowsort label-3900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 838.84 OR col0 > 864)
----
146 values hashing to 64820a2706db65d56ca6179e03ed0cb8

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab4_636
----
54 values hashing to 0bba40eadd5d0a85ca1f797ad361e6e0

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab4_636
----
146 values hashing to 64820a2706db65d56ca6179e03ed0cb8

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 838.84 OR col0 > 864 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 838.84 OR col0 > 864)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_636 UNION ALL SELECT pk, col0 FROM view_2_tab4_636
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 838.84 OR col0 > 864 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 838.84 OR col0 > 864)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_636 UNION SELECT pk, col0 FROM view_2_tab4_636
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 >= 838.84 OR col0 > 864 ) AS tab4_636
----
27 values hashing to 7e644fc9784fa8010b1a5cae8c8b2341

query I rowsort label-3900-3
SELECT * FROM view_3_tab4_636
----
27 values hashing to 7e644fc9784fa8010b1a5cae8c8b2341

query I rowsort label-3900-3
SELECT pk FROM tab4 WHERE col4 >= 838.84 OR col0 > 864
----
27 values hashing to 7e644fc9784fa8010b1a5cae8c8b2341

statement ok
DROP VIEW view_1_tab4_636

statement ok
DROP VIEW view_2_tab4_636

statement ok
DROP VIEW view_3_tab4_636

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_637') DROP VIEW view_1_tab0_637

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_637

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_637') DROP VIEW view_2_tab0_637

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_637

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_637') DROP VIEW view_3_tab0_637

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_637

statement ok
CREATE VIEW view_1_tab0_637 AS SELECT pk, col0 FROM tab0 WHERE (((col0 <= 308)))

statement ok
CREATE VIEW view_2_tab0_637 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 <= 308))))

statement ok
CREATE VIEW view_3_tab0_637 AS SELECT pk FROM view_1_tab0_637

query II rowsort label-4000-1
SELECT pk, col0 FROM tab0 WHERE (((col0 <= 308)))
----
62 values hashing to 651da17a07af30e137b1ce7dc0dcf4e2

query II rowsort label-4000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 <= 308))))
----
138 values hashing to 0bf15b80d64b3594b22888b8033dd8c9

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab0_637
----
62 values hashing to 651da17a07af30e137b1ce7dc0dcf4e2

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab0_637
----
138 values hashing to 0bf15b80d64b3594b22888b8033dd8c9

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 <= 308))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 <= 308))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_637 UNION ALL SELECT pk, col0 FROM view_2_tab0_637
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 <= 308))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 <= 308))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_637 UNION SELECT pk, col0 FROM view_2_tab0_637
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col0 <= 308))) ) AS tab0_637
----
31 values hashing to 9375ed8fe31219b00478a1b5c566434b

query I rowsort label-4000-3
SELECT * FROM view_3_tab0_637
----
31 values hashing to 9375ed8fe31219b00478a1b5c566434b

query I rowsort label-4000-3
SELECT pk FROM tab0 WHERE (((col0 <= 308)))
----
31 values hashing to 9375ed8fe31219b00478a1b5c566434b

statement ok
DROP VIEW view_1_tab0_637

statement ok
DROP VIEW view_2_tab0_637

statement ok
DROP VIEW view_3_tab0_637

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_637') DROP VIEW view_1_tab1_637

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_637

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_637') DROP VIEW view_2_tab1_637

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_637

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_637') DROP VIEW view_3_tab1_637

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_637

statement ok
CREATE VIEW view_1_tab1_637 AS SELECT pk, col0 FROM tab1 WHERE (((col0 <= 308)))

statement ok
CREATE VIEW view_2_tab1_637 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 <= 308))))

statement ok
CREATE VIEW view_3_tab1_637 AS SELECT pk FROM view_1_tab1_637

query II rowsort label-4000-1
SELECT pk, col0 FROM tab1 WHERE (((col0 <= 308)))
----
62 values hashing to 651da17a07af30e137b1ce7dc0dcf4e2

query II rowsort label-4000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 <= 308))))
----
138 values hashing to 0bf15b80d64b3594b22888b8033dd8c9

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab1_637
----
62 values hashing to 651da17a07af30e137b1ce7dc0dcf4e2

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab1_637
----
138 values hashing to 0bf15b80d64b3594b22888b8033dd8c9

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 <= 308))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 <= 308))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_637 UNION ALL SELECT pk, col0 FROM view_2_tab1_637
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 <= 308))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 <= 308))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_637 UNION SELECT pk, col0 FROM view_2_tab1_637
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col0 <= 308))) ) AS tab1_637
----
31 values hashing to 9375ed8fe31219b00478a1b5c566434b

query I rowsort label-4000-3
SELECT * FROM view_3_tab1_637
----
31 values hashing to 9375ed8fe31219b00478a1b5c566434b

query I rowsort label-4000-3
SELECT pk FROM tab1 WHERE (((col0 <= 308)))
----
31 values hashing to 9375ed8fe31219b00478a1b5c566434b

statement ok
DROP VIEW view_1_tab1_637

statement ok
DROP VIEW view_2_tab1_637

statement ok
DROP VIEW view_3_tab1_637

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_637') DROP VIEW view_1_tab2_637

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_637

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_637') DROP VIEW view_2_tab2_637

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_637

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_637') DROP VIEW view_3_tab2_637

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_637

statement ok
CREATE VIEW view_1_tab2_637 AS SELECT pk, col0 FROM tab2 WHERE (((col0 <= 308)))

statement ok
CREATE VIEW view_2_tab2_637 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 <= 308))))

statement ok
CREATE VIEW view_3_tab2_637 AS SELECT pk FROM view_1_tab2_637

query II rowsort label-4000-1
SELECT pk, col0 FROM tab2 WHERE (((col0 <= 308)))
----
62 values hashing to 651da17a07af30e137b1ce7dc0dcf4e2

query II rowsort label-4000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 <= 308))))
----
138 values hashing to 0bf15b80d64b3594b22888b8033dd8c9

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab2_637
----
62 values hashing to 651da17a07af30e137b1ce7dc0dcf4e2

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab2_637
----
138 values hashing to 0bf15b80d64b3594b22888b8033dd8c9

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 <= 308))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 <= 308))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_637 UNION ALL SELECT pk, col0 FROM view_2_tab2_637
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 <= 308))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 <= 308))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_637 UNION SELECT pk, col0 FROM view_2_tab2_637
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col0 <= 308))) ) AS tab2_637
----
31 values hashing to 9375ed8fe31219b00478a1b5c566434b

query I rowsort label-4000-3
SELECT * FROM view_3_tab2_637
----
31 values hashing to 9375ed8fe31219b00478a1b5c566434b

query I rowsort label-4000-3
SELECT pk FROM tab2 WHERE (((col0 <= 308)))
----
31 values hashing to 9375ed8fe31219b00478a1b5c566434b

statement ok
DROP VIEW view_1_tab2_637

statement ok
DROP VIEW view_2_tab2_637

statement ok
DROP VIEW view_3_tab2_637

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_637') DROP VIEW view_1_tab3_637

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_637

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_637') DROP VIEW view_2_tab3_637

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_637

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_637') DROP VIEW view_3_tab3_637

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_637

statement ok
CREATE VIEW view_1_tab3_637 AS SELECT pk, col0 FROM tab3 WHERE (((col0 <= 308)))

statement ok
CREATE VIEW view_2_tab3_637 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 <= 308))))

statement ok
CREATE VIEW view_3_tab3_637 AS SELECT pk FROM view_1_tab3_637

query II rowsort label-4000-1
SELECT pk, col0 FROM tab3 WHERE (((col0 <= 308)))
----
62 values hashing to 651da17a07af30e137b1ce7dc0dcf4e2

query II rowsort label-4000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 <= 308))))
----
138 values hashing to 0bf15b80d64b3594b22888b8033dd8c9

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab3_637
----
62 values hashing to 651da17a07af30e137b1ce7dc0dcf4e2

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab3_637
----
138 values hashing to 0bf15b80d64b3594b22888b8033dd8c9

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 <= 308))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 <= 308))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_637 UNION ALL SELECT pk, col0 FROM view_2_tab3_637
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 <= 308))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 <= 308))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_637 UNION SELECT pk, col0 FROM view_2_tab3_637
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col0 <= 308))) ) AS tab3_637
----
31 values hashing to 9375ed8fe31219b00478a1b5c566434b

query I rowsort label-4000-3
SELECT * FROM view_3_tab3_637
----
31 values hashing to 9375ed8fe31219b00478a1b5c566434b

query I rowsort label-4000-3
SELECT pk FROM tab3 WHERE (((col0 <= 308)))
----
31 values hashing to 9375ed8fe31219b00478a1b5c566434b

statement ok
DROP VIEW view_1_tab3_637

statement ok
DROP VIEW view_2_tab3_637

statement ok
DROP VIEW view_3_tab3_637

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_637') DROP VIEW view_1_tab4_637

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_637

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_637') DROP VIEW view_2_tab4_637

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_637

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_637') DROP VIEW view_3_tab4_637

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_637

statement ok
CREATE VIEW view_1_tab4_637 AS SELECT pk, col0 FROM tab4 WHERE (((col0 <= 308)))

statement ok
CREATE VIEW view_2_tab4_637 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 <= 308))))

statement ok
CREATE VIEW view_3_tab4_637 AS SELECT pk FROM view_1_tab4_637

query II rowsort label-4000-1
SELECT pk, col0 FROM tab4 WHERE (((col0 <= 308)))
----
62 values hashing to 651da17a07af30e137b1ce7dc0dcf4e2

query II rowsort label-4000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 <= 308))))
----
138 values hashing to 0bf15b80d64b3594b22888b8033dd8c9

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab4_637
----
62 values hashing to 651da17a07af30e137b1ce7dc0dcf4e2

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab4_637
----
138 values hashing to 0bf15b80d64b3594b22888b8033dd8c9

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 <= 308))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 <= 308))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_637 UNION ALL SELECT pk, col0 FROM view_2_tab4_637
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 <= 308))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 <= 308))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_637 UNION SELECT pk, col0 FROM view_2_tab4_637
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col0 <= 308))) ) AS tab4_637
----
31 values hashing to 9375ed8fe31219b00478a1b5c566434b

query I rowsort label-4000-3
SELECT * FROM view_3_tab4_637
----
31 values hashing to 9375ed8fe31219b00478a1b5c566434b

query I rowsort label-4000-3
SELECT pk FROM tab4 WHERE (((col0 <= 308)))
----
31 values hashing to 9375ed8fe31219b00478a1b5c566434b

statement ok
DROP VIEW view_1_tab4_637

statement ok
DROP VIEW view_2_tab4_637

statement ok
DROP VIEW view_3_tab4_637

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_638') DROP VIEW view_1_tab0_638

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_638

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_638') DROP VIEW view_2_tab0_638

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_638

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_638') DROP VIEW view_3_tab0_638

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_638

statement ok
CREATE VIEW view_1_tab0_638 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913)))

statement ok
CREATE VIEW view_2_tab0_638 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))

statement ok
CREATE VIEW view_3_tab0_638 AS SELECT pk FROM view_1_tab0_638

query II rowsort label-4100-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913)))
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab0_638
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab0_638
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_638 UNION ALL SELECT pk, col0 FROM view_2_tab0_638
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_638 UNION SELECT pk, col0 FROM view_2_tab0_638
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))) ) AS tab0_638
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab0_638
----

query I rowsort label-4100-3
SELECT pk FROM tab0 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913)))
----

statement ok
DROP VIEW view_1_tab0_638

statement ok
DROP VIEW view_2_tab0_638

statement ok
DROP VIEW view_3_tab0_638

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_638') DROP VIEW view_1_tab1_638

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_638

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_638') DROP VIEW view_2_tab1_638

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_638

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_638') DROP VIEW view_3_tab1_638

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_638

statement ok
CREATE VIEW view_1_tab1_638 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913)))

statement ok
CREATE VIEW view_2_tab1_638 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))

statement ok
CREATE VIEW view_3_tab1_638 AS SELECT pk FROM view_1_tab1_638

query II rowsort label-4100-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913)))
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab1_638
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab1_638
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_638 UNION ALL SELECT pk, col0 FROM view_2_tab1_638
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_638 UNION SELECT pk, col0 FROM view_2_tab1_638
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))) ) AS tab1_638
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab1_638
----

query I rowsort label-4100-3
SELECT pk FROM tab1 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913)))
----

statement ok
DROP VIEW view_1_tab1_638

statement ok
DROP VIEW view_2_tab1_638

statement ok
DROP VIEW view_3_tab1_638

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_638') DROP VIEW view_1_tab2_638

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_638

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_638') DROP VIEW view_2_tab2_638

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_638

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_638') DROP VIEW view_3_tab2_638

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_638

statement ok
CREATE VIEW view_1_tab2_638 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913)))

statement ok
CREATE VIEW view_2_tab2_638 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))

statement ok
CREATE VIEW view_3_tab2_638 AS SELECT pk FROM view_1_tab2_638

query II rowsort label-4100-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913)))
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab2_638
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab2_638
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_638 UNION ALL SELECT pk, col0 FROM view_2_tab2_638
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_638 UNION SELECT pk, col0 FROM view_2_tab2_638
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))) ) AS tab2_638
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab2_638
----

query I rowsort label-4100-3
SELECT pk FROM tab2 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913)))
----

statement ok
DROP VIEW view_1_tab2_638

statement ok
DROP VIEW view_2_tab2_638

statement ok
DROP VIEW view_3_tab2_638

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_638') DROP VIEW view_1_tab3_638

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_638

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_638') DROP VIEW view_2_tab3_638

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_638

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_638') DROP VIEW view_3_tab3_638

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_638

statement ok
CREATE VIEW view_1_tab3_638 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913)))

statement ok
CREATE VIEW view_2_tab3_638 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))

statement ok
CREATE VIEW view_3_tab3_638 AS SELECT pk FROM view_1_tab3_638

query II rowsort label-4100-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913)))
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab3_638
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab3_638
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_638 UNION ALL SELECT pk, col0 FROM view_2_tab3_638
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_638 UNION SELECT pk, col0 FROM view_2_tab3_638
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))) ) AS tab3_638
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab3_638
----

query I rowsort label-4100-3
SELECT pk FROM tab3 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913)))
----

statement ok
DROP VIEW view_1_tab3_638

statement ok
DROP VIEW view_2_tab3_638

statement ok
DROP VIEW view_3_tab3_638

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_638') DROP VIEW view_1_tab4_638

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_638

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_638') DROP VIEW view_2_tab4_638

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_638

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_638') DROP VIEW view_3_tab4_638

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_638

statement ok
CREATE VIEW view_1_tab4_638 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913)))

statement ok
CREATE VIEW view_2_tab4_638 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))

statement ok
CREATE VIEW view_3_tab4_638 AS SELECT pk FROM view_1_tab4_638

query II rowsort label-4100-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913)))
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab4_638
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab4_638
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_638 UNION ALL SELECT pk, col0 FROM view_2_tab4_638
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_638 UNION SELECT pk, col0 FROM view_2_tab4_638
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913))) ) AS tab4_638
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab4_638
----

query I rowsort label-4100-3
SELECT pk FROM tab4 WHERE col0 <= 632 AND (col0 > 947) AND col0 < 824 AND ((col3 > 207) OR ((col0 < 913)))
----

statement ok
DROP VIEW view_1_tab4_638

statement ok
DROP VIEW view_2_tab4_638

statement ok
DROP VIEW view_3_tab4_638

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_639') DROP VIEW view_1_tab0_639

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_639

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_639') DROP VIEW view_2_tab0_639

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_639

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_639') DROP VIEW view_3_tab0_639

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_639

statement ok
CREATE VIEW view_1_tab0_639 AS SELECT pk, col0 FROM tab0 WHERE (col3 > 53)

statement ok
CREATE VIEW view_2_tab0_639 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 53))

statement ok
CREATE VIEW view_3_tab0_639 AS SELECT pk FROM view_1_tab0_639

query II rowsort label-4200-1
SELECT pk, col0 FROM tab0 WHERE (col3 > 53)
----
190 values hashing to a386c0012798cb474a25c5f329567762

query II rowsort label-4200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 53))
----
10 values hashing to c671c1d0ae1383e0993f8e8f2826c37a

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab0_639
----
190 values hashing to a386c0012798cb474a25c5f329567762

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab0_639
----
10 values hashing to c671c1d0ae1383e0993f8e8f2826c37a

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 53) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 53))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_639 UNION ALL SELECT pk, col0 FROM view_2_tab0_639
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 53) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 53))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_639 UNION SELECT pk, col0 FROM view_2_tab0_639
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 > 53) ) AS tab0_639
----
95 values hashing to fc050f03ae4cde40d79b00065d4b0125

query I rowsort label-4200-3
SELECT * FROM view_3_tab0_639
----
95 values hashing to fc050f03ae4cde40d79b00065d4b0125

query I rowsort label-4200-3
SELECT pk FROM tab0 WHERE (col3 > 53)
----
95 values hashing to fc050f03ae4cde40d79b00065d4b0125

statement ok
DROP VIEW view_1_tab0_639

statement ok
DROP VIEW view_2_tab0_639

statement ok
DROP VIEW view_3_tab0_639

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_639') DROP VIEW view_1_tab1_639

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_639

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_639') DROP VIEW view_2_tab1_639

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_639

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_639') DROP VIEW view_3_tab1_639

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_639

statement ok
CREATE VIEW view_1_tab1_639 AS SELECT pk, col0 FROM tab1 WHERE (col3 > 53)

statement ok
CREATE VIEW view_2_tab1_639 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 53))

statement ok
CREATE VIEW view_3_tab1_639 AS SELECT pk FROM view_1_tab1_639

query II rowsort label-4200-1
SELECT pk, col0 FROM tab1 WHERE (col3 > 53)
----
190 values hashing to a386c0012798cb474a25c5f329567762

query II rowsort label-4200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 53))
----
10 values hashing to c671c1d0ae1383e0993f8e8f2826c37a

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab1_639
----
190 values hashing to a386c0012798cb474a25c5f329567762

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab1_639
----
10 values hashing to c671c1d0ae1383e0993f8e8f2826c37a

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 53) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 53))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_639 UNION ALL SELECT pk, col0 FROM view_2_tab1_639
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 53) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 53))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_639 UNION SELECT pk, col0 FROM view_2_tab1_639
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 > 53) ) AS tab1_639
----
95 values hashing to fc050f03ae4cde40d79b00065d4b0125

query I rowsort label-4200-3
SELECT * FROM view_3_tab1_639
----
95 values hashing to fc050f03ae4cde40d79b00065d4b0125

query I rowsort label-4200-3
SELECT pk FROM tab1 WHERE (col3 > 53)
----
95 values hashing to fc050f03ae4cde40d79b00065d4b0125

statement ok
DROP VIEW view_1_tab1_639

statement ok
DROP VIEW view_2_tab1_639

statement ok
DROP VIEW view_3_tab1_639

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_639') DROP VIEW view_1_tab2_639

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_639

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_639') DROP VIEW view_2_tab2_639

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_639

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_639') DROP VIEW view_3_tab2_639

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_639

statement ok
CREATE VIEW view_1_tab2_639 AS SELECT pk, col0 FROM tab2 WHERE (col3 > 53)

statement ok
CREATE VIEW view_2_tab2_639 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 53))

statement ok
CREATE VIEW view_3_tab2_639 AS SELECT pk FROM view_1_tab2_639

query II rowsort label-4200-1
SELECT pk, col0 FROM tab2 WHERE (col3 > 53)
----
190 values hashing to a386c0012798cb474a25c5f329567762

query II rowsort label-4200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 53))
----
10 values hashing to c671c1d0ae1383e0993f8e8f2826c37a

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab2_639
----
190 values hashing to a386c0012798cb474a25c5f329567762

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab2_639
----
10 values hashing to c671c1d0ae1383e0993f8e8f2826c37a

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 53) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 53))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_639 UNION ALL SELECT pk, col0 FROM view_2_tab2_639
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 53) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 53))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_639 UNION SELECT pk, col0 FROM view_2_tab2_639
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 > 53) ) AS tab2_639
----
95 values hashing to fc050f03ae4cde40d79b00065d4b0125

query I rowsort label-4200-3
SELECT * FROM view_3_tab2_639
----
95 values hashing to fc050f03ae4cde40d79b00065d4b0125

query I rowsort label-4200-3
SELECT pk FROM tab2 WHERE (col3 > 53)
----
95 values hashing to fc050f03ae4cde40d79b00065d4b0125

statement ok
DROP VIEW view_1_tab2_639

statement ok
DROP VIEW view_2_tab2_639

statement ok
DROP VIEW view_3_tab2_639

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_639') DROP VIEW view_1_tab3_639

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_639

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_639') DROP VIEW view_2_tab3_639

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_639

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_639') DROP VIEW view_3_tab3_639

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_639

statement ok
CREATE VIEW view_1_tab3_639 AS SELECT pk, col0 FROM tab3 WHERE (col3 > 53)

statement ok
CREATE VIEW view_2_tab3_639 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 53))

statement ok
CREATE VIEW view_3_tab3_639 AS SELECT pk FROM view_1_tab3_639

query II rowsort label-4200-1
SELECT pk, col0 FROM tab3 WHERE (col3 > 53)
----
190 values hashing to a386c0012798cb474a25c5f329567762

query II rowsort label-4200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 53))
----
10 values hashing to c671c1d0ae1383e0993f8e8f2826c37a

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab3_639
----
190 values hashing to a386c0012798cb474a25c5f329567762

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab3_639
----
10 values hashing to c671c1d0ae1383e0993f8e8f2826c37a

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 53) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 53))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_639 UNION ALL SELECT pk, col0 FROM view_2_tab3_639
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 53) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 53))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_639 UNION SELECT pk, col0 FROM view_2_tab3_639
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 > 53) ) AS tab3_639
----
95 values hashing to fc050f03ae4cde40d79b00065d4b0125

query I rowsort label-4200-3
SELECT * FROM view_3_tab3_639
----
95 values hashing to fc050f03ae4cde40d79b00065d4b0125

query I rowsort label-4200-3
SELECT pk FROM tab3 WHERE (col3 > 53)
----
95 values hashing to fc050f03ae4cde40d79b00065d4b0125

statement ok
DROP VIEW view_1_tab3_639

statement ok
DROP VIEW view_2_tab3_639

statement ok
DROP VIEW view_3_tab3_639

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_639') DROP VIEW view_1_tab4_639

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_639

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_639') DROP VIEW view_2_tab4_639

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_639

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_639') DROP VIEW view_3_tab4_639

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_639

statement ok
CREATE VIEW view_1_tab4_639 AS SELECT pk, col0 FROM tab4 WHERE (col3 > 53)

statement ok
CREATE VIEW view_2_tab4_639 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 53))

statement ok
CREATE VIEW view_3_tab4_639 AS SELECT pk FROM view_1_tab4_639

query II rowsort label-4200-1
SELECT pk, col0 FROM tab4 WHERE (col3 > 53)
----
190 values hashing to a386c0012798cb474a25c5f329567762

query II rowsort label-4200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 53))
----
10 values hashing to c671c1d0ae1383e0993f8e8f2826c37a

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab4_639
----
190 values hashing to a386c0012798cb474a25c5f329567762

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab4_639
----
10 values hashing to c671c1d0ae1383e0993f8e8f2826c37a

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 53) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 53))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_639 UNION ALL SELECT pk, col0 FROM view_2_tab4_639
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 53) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 53))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_639 UNION SELECT pk, col0 FROM view_2_tab4_639
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 > 53) ) AS tab4_639
----
95 values hashing to fc050f03ae4cde40d79b00065d4b0125

query I rowsort label-4200-3
SELECT * FROM view_3_tab4_639
----
95 values hashing to fc050f03ae4cde40d79b00065d4b0125

query I rowsort label-4200-3
SELECT pk FROM tab4 WHERE (col3 > 53)
----
95 values hashing to fc050f03ae4cde40d79b00065d4b0125

statement ok
DROP VIEW view_1_tab4_639

statement ok
DROP VIEW view_2_tab4_639

statement ok
DROP VIEW view_3_tab4_639

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_641') DROP VIEW view_1_tab0_641

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_641

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_641') DROP VIEW view_2_tab0_641

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_641

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_641') DROP VIEW view_3_tab0_641

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_641

statement ok
CREATE VIEW view_1_tab0_641 AS SELECT pk, col0 FROM tab0 WHERE col0 < 555 AND col0 >= 88

statement ok
CREATE VIEW view_2_tab0_641 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 555 AND col0 >= 88)

statement ok
CREATE VIEW view_3_tab0_641 AS SELECT pk FROM view_1_tab0_641

query II rowsort label-4300-1
SELECT pk, col0 FROM tab0 WHERE col0 < 555 AND col0 >= 88
----
80 values hashing to 2c15b3c57d85fcf97005185db30caee3

query II rowsort label-4300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 555 AND col0 >= 88)
----
120 values hashing to a5492896886c9b4cd42707fa5065d384

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab0_641
----
80 values hashing to 2c15b3c57d85fcf97005185db30caee3

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab0_641
----
120 values hashing to a5492896886c9b4cd42707fa5065d384

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 555 AND col0 >= 88 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 555 AND col0 >= 88)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_641 UNION ALL SELECT pk, col0 FROM view_2_tab0_641
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 555 AND col0 >= 88 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 555 AND col0 >= 88)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_641 UNION SELECT pk, col0 FROM view_2_tab0_641
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 555 AND col0 >= 88 ) AS tab0_641
----
40 values hashing to a4c36d978797cfb924718f92b228af58

query I rowsort label-4300-3
SELECT * FROM view_3_tab0_641
----
40 values hashing to a4c36d978797cfb924718f92b228af58

query I rowsort label-4300-3
SELECT pk FROM tab0 WHERE col0 < 555 AND col0 >= 88
----
40 values hashing to a4c36d978797cfb924718f92b228af58

statement ok
DROP VIEW view_1_tab0_641

statement ok
DROP VIEW view_2_tab0_641

statement ok
DROP VIEW view_3_tab0_641

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_641') DROP VIEW view_1_tab1_641

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_641

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_641') DROP VIEW view_2_tab1_641

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_641

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_641') DROP VIEW view_3_tab1_641

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_641

statement ok
CREATE VIEW view_1_tab1_641 AS SELECT pk, col0 FROM tab1 WHERE col0 < 555 AND col0 >= 88

statement ok
CREATE VIEW view_2_tab1_641 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 555 AND col0 >= 88)

statement ok
CREATE VIEW view_3_tab1_641 AS SELECT pk FROM view_1_tab1_641

query II rowsort label-4300-1
SELECT pk, col0 FROM tab1 WHERE col0 < 555 AND col0 >= 88
----
80 values hashing to 2c15b3c57d85fcf97005185db30caee3

query II rowsort label-4300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 555 AND col0 >= 88)
----
120 values hashing to a5492896886c9b4cd42707fa5065d384

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab1_641
----
80 values hashing to 2c15b3c57d85fcf97005185db30caee3

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab1_641
----
120 values hashing to a5492896886c9b4cd42707fa5065d384

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 555 AND col0 >= 88 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 555 AND col0 >= 88)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_641 UNION ALL SELECT pk, col0 FROM view_2_tab1_641
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 555 AND col0 >= 88 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 555 AND col0 >= 88)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_641 UNION SELECT pk, col0 FROM view_2_tab1_641
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 555 AND col0 >= 88 ) AS tab1_641
----
40 values hashing to a4c36d978797cfb924718f92b228af58

query I rowsort label-4300-3
SELECT * FROM view_3_tab1_641
----
40 values hashing to a4c36d978797cfb924718f92b228af58

query I rowsort label-4300-3
SELECT pk FROM tab1 WHERE col0 < 555 AND col0 >= 88
----
40 values hashing to a4c36d978797cfb924718f92b228af58

statement ok
DROP VIEW view_1_tab1_641

statement ok
DROP VIEW view_2_tab1_641

statement ok
DROP VIEW view_3_tab1_641

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_641') DROP VIEW view_1_tab2_641

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_641

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_641') DROP VIEW view_2_tab2_641

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_641

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_641') DROP VIEW view_3_tab2_641

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_641

statement ok
CREATE VIEW view_1_tab2_641 AS SELECT pk, col0 FROM tab2 WHERE col0 < 555 AND col0 >= 88

statement ok
CREATE VIEW view_2_tab2_641 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 555 AND col0 >= 88)

statement ok
CREATE VIEW view_3_tab2_641 AS SELECT pk FROM view_1_tab2_641

query II rowsort label-4300-1
SELECT pk, col0 FROM tab2 WHERE col0 < 555 AND col0 >= 88
----
80 values hashing to 2c15b3c57d85fcf97005185db30caee3

query II rowsort label-4300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 555 AND col0 >= 88)
----
120 values hashing to a5492896886c9b4cd42707fa5065d384

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab2_641
----
80 values hashing to 2c15b3c57d85fcf97005185db30caee3

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab2_641
----
120 values hashing to a5492896886c9b4cd42707fa5065d384

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 555 AND col0 >= 88 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 555 AND col0 >= 88)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_641 UNION ALL SELECT pk, col0 FROM view_2_tab2_641
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 555 AND col0 >= 88 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 555 AND col0 >= 88)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_641 UNION SELECT pk, col0 FROM view_2_tab2_641
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 555 AND col0 >= 88 ) AS tab2_641
----
40 values hashing to a4c36d978797cfb924718f92b228af58

query I rowsort label-4300-3
SELECT * FROM view_3_tab2_641
----
40 values hashing to a4c36d978797cfb924718f92b228af58

query I rowsort label-4300-3
SELECT pk FROM tab2 WHERE col0 < 555 AND col0 >= 88
----
40 values hashing to a4c36d978797cfb924718f92b228af58

statement ok
DROP VIEW view_1_tab2_641

statement ok
DROP VIEW view_2_tab2_641

statement ok
DROP VIEW view_3_tab2_641

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_641') DROP VIEW view_1_tab3_641

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_641

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_641') DROP VIEW view_2_tab3_641

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_641

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_641') DROP VIEW view_3_tab3_641

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_641

statement ok
CREATE VIEW view_1_tab3_641 AS SELECT pk, col0 FROM tab3 WHERE col0 < 555 AND col0 >= 88

statement ok
CREATE VIEW view_2_tab3_641 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 555 AND col0 >= 88)

statement ok
CREATE VIEW view_3_tab3_641 AS SELECT pk FROM view_1_tab3_641

query II rowsort label-4300-1
SELECT pk, col0 FROM tab3 WHERE col0 < 555 AND col0 >= 88
----
80 values hashing to 2c15b3c57d85fcf97005185db30caee3

query II rowsort label-4300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 555 AND col0 >= 88)
----
120 values hashing to a5492896886c9b4cd42707fa5065d384

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab3_641
----
80 values hashing to 2c15b3c57d85fcf97005185db30caee3

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab3_641
----
120 values hashing to a5492896886c9b4cd42707fa5065d384

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 555 AND col0 >= 88 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 555 AND col0 >= 88)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_641 UNION ALL SELECT pk, col0 FROM view_2_tab3_641
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 555 AND col0 >= 88 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 555 AND col0 >= 88)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_641 UNION SELECT pk, col0 FROM view_2_tab3_641
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 555 AND col0 >= 88 ) AS tab3_641
----
40 values hashing to a4c36d978797cfb924718f92b228af58

query I rowsort label-4300-3
SELECT * FROM view_3_tab3_641
----
40 values hashing to a4c36d978797cfb924718f92b228af58

query I rowsort label-4300-3
SELECT pk FROM tab3 WHERE col0 < 555 AND col0 >= 88
----
40 values hashing to a4c36d978797cfb924718f92b228af58

statement ok
DROP VIEW view_1_tab3_641

statement ok
DROP VIEW view_2_tab3_641

statement ok
DROP VIEW view_3_tab3_641

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_641') DROP VIEW view_1_tab4_641

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_641

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_641') DROP VIEW view_2_tab4_641

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_641

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_641') DROP VIEW view_3_tab4_641

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_641

statement ok
CREATE VIEW view_1_tab4_641 AS SELECT pk, col0 FROM tab4 WHERE col0 < 555 AND col0 >= 88

statement ok
CREATE VIEW view_2_tab4_641 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 555 AND col0 >= 88)

statement ok
CREATE VIEW view_3_tab4_641 AS SELECT pk FROM view_1_tab4_641

query II rowsort label-4300-1
SELECT pk, col0 FROM tab4 WHERE col0 < 555 AND col0 >= 88
----
80 values hashing to 2c15b3c57d85fcf97005185db30caee3

query II rowsort label-4300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 555 AND col0 >= 88)
----
120 values hashing to a5492896886c9b4cd42707fa5065d384

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab4_641
----
80 values hashing to 2c15b3c57d85fcf97005185db30caee3

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab4_641
----
120 values hashing to a5492896886c9b4cd42707fa5065d384

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 555 AND col0 >= 88 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 555 AND col0 >= 88)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_641 UNION ALL SELECT pk, col0 FROM view_2_tab4_641
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 555 AND col0 >= 88 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 555 AND col0 >= 88)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_641 UNION SELECT pk, col0 FROM view_2_tab4_641
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 555 AND col0 >= 88 ) AS tab4_641
----
40 values hashing to a4c36d978797cfb924718f92b228af58

query I rowsort label-4300-3
SELECT * FROM view_3_tab4_641
----
40 values hashing to a4c36d978797cfb924718f92b228af58

query I rowsort label-4300-3
SELECT pk FROM tab4 WHERE col0 < 555 AND col0 >= 88
----
40 values hashing to a4c36d978797cfb924718f92b228af58

statement ok
DROP VIEW view_1_tab4_641

statement ok
DROP VIEW view_2_tab4_641

statement ok
DROP VIEW view_3_tab4_641

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_642') DROP VIEW view_1_tab0_642

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_642

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_642') DROP VIEW view_2_tab0_642

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_642

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_642') DROP VIEW view_3_tab0_642

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_642

statement ok
CREATE VIEW view_1_tab0_642 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 213

statement ok
CREATE VIEW view_2_tab0_642 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 213)

statement ok
CREATE VIEW view_3_tab0_642 AS SELECT pk FROM view_1_tab0_642

query II rowsort label-4400-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 213
----
48 values hashing to ee145c3a84b3fbb3a12ee9080323ce5d

query II rowsort label-4400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 213)
----
152 values hashing to de8913936e7fe39e5292265e83752f60

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab0_642
----
48 values hashing to ee145c3a84b3fbb3a12ee9080323ce5d

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab0_642
----
152 values hashing to de8913936e7fe39e5292265e83752f60

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 213 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 213)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_642 UNION ALL SELECT pk, col0 FROM view_2_tab0_642
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 213 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 213)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_642 UNION SELECT pk, col0 FROM view_2_tab0_642
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 213 ) AS tab0_642
----
24 values hashing to 50c8c9b225e92585c43981b40b6b0a9c

query I rowsort label-4400-3
SELECT * FROM view_3_tab0_642
----
24 values hashing to 50c8c9b225e92585c43981b40b6b0a9c

query I rowsort label-4400-3
SELECT pk FROM tab0 WHERE col0 <= 213
----
24 values hashing to 50c8c9b225e92585c43981b40b6b0a9c

statement ok
DROP VIEW view_1_tab0_642

statement ok
DROP VIEW view_2_tab0_642

statement ok
DROP VIEW view_3_tab0_642

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_642') DROP VIEW view_1_tab1_642

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_642

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_642') DROP VIEW view_2_tab1_642

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_642

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_642') DROP VIEW view_3_tab1_642

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_642

statement ok
CREATE VIEW view_1_tab1_642 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 213

statement ok
CREATE VIEW view_2_tab1_642 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 213)

statement ok
CREATE VIEW view_3_tab1_642 AS SELECT pk FROM view_1_tab1_642

query II rowsort label-4400-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 213
----
48 values hashing to ee145c3a84b3fbb3a12ee9080323ce5d

query II rowsort label-4400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 213)
----
152 values hashing to de8913936e7fe39e5292265e83752f60

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab1_642
----
48 values hashing to ee145c3a84b3fbb3a12ee9080323ce5d

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab1_642
----
152 values hashing to de8913936e7fe39e5292265e83752f60

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 213 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 213)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_642 UNION ALL SELECT pk, col0 FROM view_2_tab1_642
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 213 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 213)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_642 UNION SELECT pk, col0 FROM view_2_tab1_642
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 213 ) AS tab1_642
----
24 values hashing to 50c8c9b225e92585c43981b40b6b0a9c

query I rowsort label-4400-3
SELECT * FROM view_3_tab1_642
----
24 values hashing to 50c8c9b225e92585c43981b40b6b0a9c

query I rowsort label-4400-3
SELECT pk FROM tab1 WHERE col0 <= 213
----
24 values hashing to 50c8c9b225e92585c43981b40b6b0a9c

statement ok
DROP VIEW view_1_tab1_642

statement ok
DROP VIEW view_2_tab1_642

statement ok
DROP VIEW view_3_tab1_642

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_642') DROP VIEW view_1_tab2_642

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_642

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_642') DROP VIEW view_2_tab2_642

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_642

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_642') DROP VIEW view_3_tab2_642

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_642

statement ok
CREATE VIEW view_1_tab2_642 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 213

statement ok
CREATE VIEW view_2_tab2_642 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 213)

statement ok
CREATE VIEW view_3_tab2_642 AS SELECT pk FROM view_1_tab2_642

query II rowsort label-4400-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 213
----
48 values hashing to ee145c3a84b3fbb3a12ee9080323ce5d

query II rowsort label-4400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 213)
----
152 values hashing to de8913936e7fe39e5292265e83752f60

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab2_642
----
48 values hashing to ee145c3a84b3fbb3a12ee9080323ce5d

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab2_642
----
152 values hashing to de8913936e7fe39e5292265e83752f60

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 213 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 213)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_642 UNION ALL SELECT pk, col0 FROM view_2_tab2_642
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 213 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 213)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_642 UNION SELECT pk, col0 FROM view_2_tab2_642
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 213 ) AS tab2_642
----
24 values hashing to 50c8c9b225e92585c43981b40b6b0a9c

query I rowsort label-4400-3
SELECT * FROM view_3_tab2_642
----
24 values hashing to 50c8c9b225e92585c43981b40b6b0a9c

query I rowsort label-4400-3
SELECT pk FROM tab2 WHERE col0 <= 213
----
24 values hashing to 50c8c9b225e92585c43981b40b6b0a9c

statement ok
DROP VIEW view_1_tab2_642

statement ok
DROP VIEW view_2_tab2_642

statement ok
DROP VIEW view_3_tab2_642

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_642') DROP VIEW view_1_tab3_642

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_642

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_642') DROP VIEW view_2_tab3_642

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_642

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_642') DROP VIEW view_3_tab3_642

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_642

statement ok
CREATE VIEW view_1_tab3_642 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 213

statement ok
CREATE VIEW view_2_tab3_642 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 213)

statement ok
CREATE VIEW view_3_tab3_642 AS SELECT pk FROM view_1_tab3_642

query II rowsort label-4400-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 213
----
48 values hashing to ee145c3a84b3fbb3a12ee9080323ce5d

query II rowsort label-4400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 213)
----
152 values hashing to de8913936e7fe39e5292265e83752f60

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab3_642
----
48 values hashing to ee145c3a84b3fbb3a12ee9080323ce5d

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab3_642
----
152 values hashing to de8913936e7fe39e5292265e83752f60

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 213 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 213)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_642 UNION ALL SELECT pk, col0 FROM view_2_tab3_642
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 213 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 213)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_642 UNION SELECT pk, col0 FROM view_2_tab3_642
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 213 ) AS tab3_642
----
24 values hashing to 50c8c9b225e92585c43981b40b6b0a9c

query I rowsort label-4400-3
SELECT * FROM view_3_tab3_642
----
24 values hashing to 50c8c9b225e92585c43981b40b6b0a9c

query I rowsort label-4400-3
SELECT pk FROM tab3 WHERE col0 <= 213
----
24 values hashing to 50c8c9b225e92585c43981b40b6b0a9c

statement ok
DROP VIEW view_1_tab3_642

statement ok
DROP VIEW view_2_tab3_642

statement ok
DROP VIEW view_3_tab3_642

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_642') DROP VIEW view_1_tab4_642

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_642

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_642') DROP VIEW view_2_tab4_642

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_642

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_642') DROP VIEW view_3_tab4_642

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_642

statement ok
CREATE VIEW view_1_tab4_642 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 213

statement ok
CREATE VIEW view_2_tab4_642 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 213)

statement ok
CREATE VIEW view_3_tab4_642 AS SELECT pk FROM view_1_tab4_642

query II rowsort label-4400-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 213
----
48 values hashing to ee145c3a84b3fbb3a12ee9080323ce5d

query II rowsort label-4400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 213)
----
152 values hashing to de8913936e7fe39e5292265e83752f60

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab4_642
----
48 values hashing to ee145c3a84b3fbb3a12ee9080323ce5d

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab4_642
----
152 values hashing to de8913936e7fe39e5292265e83752f60

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 213 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 213)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_642 UNION ALL SELECT pk, col0 FROM view_2_tab4_642
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 213 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 213)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_642 UNION SELECT pk, col0 FROM view_2_tab4_642
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 213 ) AS tab4_642
----
24 values hashing to 50c8c9b225e92585c43981b40b6b0a9c

query I rowsort label-4400-3
SELECT * FROM view_3_tab4_642
----
24 values hashing to 50c8c9b225e92585c43981b40b6b0a9c

query I rowsort label-4400-3
SELECT pk FROM tab4 WHERE col0 <= 213
----
24 values hashing to 50c8c9b225e92585c43981b40b6b0a9c

statement ok
DROP VIEW view_1_tab4_642

statement ok
DROP VIEW view_2_tab4_642

statement ok
DROP VIEW view_3_tab4_642

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_643') DROP VIEW view_1_tab0_643

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_643

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_643') DROP VIEW view_2_tab0_643

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_643

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_643') DROP VIEW view_3_tab0_643

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_643

statement ok
CREATE VIEW view_1_tab0_643 AS SELECT pk, col0 FROM tab0 WHERE col0 > 687

statement ok
CREATE VIEW view_2_tab0_643 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 687)

statement ok
CREATE VIEW view_3_tab0_643 AS SELECT pk FROM view_1_tab0_643

query II rowsort label-4500-1
SELECT pk, col0 FROM tab0 WHERE col0 > 687
----
60 values hashing to ef55520e838e5c658a3e27ef4d3286d4

query II rowsort label-4500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 687)
----
140 values hashing to 3da2da655208670483d039fce8ca3a57

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab0_643
----
60 values hashing to ef55520e838e5c658a3e27ef4d3286d4

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab0_643
----
140 values hashing to 3da2da655208670483d039fce8ca3a57

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 687 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 687)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_643 UNION ALL SELECT pk, col0 FROM view_2_tab0_643
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 687 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 687)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_643 UNION SELECT pk, col0 FROM view_2_tab0_643
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 687 ) AS tab0_643
----
30 values hashing to b3f1ddfddb20f2acadba9061190de845

query I rowsort label-4500-3
SELECT * FROM view_3_tab0_643
----
30 values hashing to b3f1ddfddb20f2acadba9061190de845

query I rowsort label-4500-3
SELECT pk FROM tab0 WHERE col0 > 687
----
30 values hashing to b3f1ddfddb20f2acadba9061190de845

statement ok
DROP VIEW view_1_tab0_643

statement ok
DROP VIEW view_2_tab0_643

statement ok
DROP VIEW view_3_tab0_643

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_643') DROP VIEW view_1_tab1_643

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_643

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_643') DROP VIEW view_2_tab1_643

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_643

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_643') DROP VIEW view_3_tab1_643

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_643

statement ok
CREATE VIEW view_1_tab1_643 AS SELECT pk, col0 FROM tab1 WHERE col0 > 687

statement ok
CREATE VIEW view_2_tab1_643 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 687)

statement ok
CREATE VIEW view_3_tab1_643 AS SELECT pk FROM view_1_tab1_643

query II rowsort label-4500-1
SELECT pk, col0 FROM tab1 WHERE col0 > 687
----
60 values hashing to ef55520e838e5c658a3e27ef4d3286d4

query II rowsort label-4500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 687)
----
140 values hashing to 3da2da655208670483d039fce8ca3a57

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab1_643
----
60 values hashing to ef55520e838e5c658a3e27ef4d3286d4

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab1_643
----
140 values hashing to 3da2da655208670483d039fce8ca3a57

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 687 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 687)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_643 UNION ALL SELECT pk, col0 FROM view_2_tab1_643
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 687 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 687)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_643 UNION SELECT pk, col0 FROM view_2_tab1_643
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 687 ) AS tab1_643
----
30 values hashing to b3f1ddfddb20f2acadba9061190de845

query I rowsort label-4500-3
SELECT * FROM view_3_tab1_643
----
30 values hashing to b3f1ddfddb20f2acadba9061190de845

query I rowsort label-4500-3
SELECT pk FROM tab1 WHERE col0 > 687
----
30 values hashing to b3f1ddfddb20f2acadba9061190de845

statement ok
DROP VIEW view_1_tab1_643

statement ok
DROP VIEW view_2_tab1_643

statement ok
DROP VIEW view_3_tab1_643

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_643') DROP VIEW view_1_tab2_643

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_643

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_643') DROP VIEW view_2_tab2_643

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_643

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_643') DROP VIEW view_3_tab2_643

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_643

statement ok
CREATE VIEW view_1_tab2_643 AS SELECT pk, col0 FROM tab2 WHERE col0 > 687

statement ok
CREATE VIEW view_2_tab2_643 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 687)

statement ok
CREATE VIEW view_3_tab2_643 AS SELECT pk FROM view_1_tab2_643

query II rowsort label-4500-1
SELECT pk, col0 FROM tab2 WHERE col0 > 687
----
60 values hashing to ef55520e838e5c658a3e27ef4d3286d4

query II rowsort label-4500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 687)
----
140 values hashing to 3da2da655208670483d039fce8ca3a57

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab2_643
----
60 values hashing to ef55520e838e5c658a3e27ef4d3286d4

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab2_643
----
140 values hashing to 3da2da655208670483d039fce8ca3a57

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 687 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 687)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_643 UNION ALL SELECT pk, col0 FROM view_2_tab2_643
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 687 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 687)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_643 UNION SELECT pk, col0 FROM view_2_tab2_643
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 687 ) AS tab2_643
----
30 values hashing to b3f1ddfddb20f2acadba9061190de845

query I rowsort label-4500-3
SELECT * FROM view_3_tab2_643
----
30 values hashing to b3f1ddfddb20f2acadba9061190de845

query I rowsort label-4500-3
SELECT pk FROM tab2 WHERE col0 > 687
----
30 values hashing to b3f1ddfddb20f2acadba9061190de845

statement ok
DROP VIEW view_1_tab2_643

statement ok
DROP VIEW view_2_tab2_643

statement ok
DROP VIEW view_3_tab2_643

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_643') DROP VIEW view_1_tab3_643

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_643

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_643') DROP VIEW view_2_tab3_643

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_643

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_643') DROP VIEW view_3_tab3_643

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_643

statement ok
CREATE VIEW view_1_tab3_643 AS SELECT pk, col0 FROM tab3 WHERE col0 > 687

statement ok
CREATE VIEW view_2_tab3_643 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 687)

statement ok
CREATE VIEW view_3_tab3_643 AS SELECT pk FROM view_1_tab3_643

query II rowsort label-4500-1
SELECT pk, col0 FROM tab3 WHERE col0 > 687
----
60 values hashing to ef55520e838e5c658a3e27ef4d3286d4

query II rowsort label-4500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 687)
----
140 values hashing to 3da2da655208670483d039fce8ca3a57

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab3_643
----
60 values hashing to ef55520e838e5c658a3e27ef4d3286d4

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab3_643
----
140 values hashing to 3da2da655208670483d039fce8ca3a57

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 687 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 687)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_643 UNION ALL SELECT pk, col0 FROM view_2_tab3_643
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 687 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 687)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_643 UNION SELECT pk, col0 FROM view_2_tab3_643
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 687 ) AS tab3_643
----
30 values hashing to b3f1ddfddb20f2acadba9061190de845

query I rowsort label-4500-3
SELECT * FROM view_3_tab3_643
----
30 values hashing to b3f1ddfddb20f2acadba9061190de845

query I rowsort label-4500-3
SELECT pk FROM tab3 WHERE col0 > 687
----
30 values hashing to b3f1ddfddb20f2acadba9061190de845

statement ok
DROP VIEW view_1_tab3_643

statement ok
DROP VIEW view_2_tab3_643

statement ok
DROP VIEW view_3_tab3_643

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_643') DROP VIEW view_1_tab4_643

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_643

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_643') DROP VIEW view_2_tab4_643

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_643

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_643') DROP VIEW view_3_tab4_643

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_643

statement ok
CREATE VIEW view_1_tab4_643 AS SELECT pk, col0 FROM tab4 WHERE col0 > 687

statement ok
CREATE VIEW view_2_tab4_643 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 687)

statement ok
CREATE VIEW view_3_tab4_643 AS SELECT pk FROM view_1_tab4_643

query II rowsort label-4500-1
SELECT pk, col0 FROM tab4 WHERE col0 > 687
----
60 values hashing to ef55520e838e5c658a3e27ef4d3286d4

query II rowsort label-4500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 687)
----
140 values hashing to 3da2da655208670483d039fce8ca3a57

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab4_643
----
60 values hashing to ef55520e838e5c658a3e27ef4d3286d4

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab4_643
----
140 values hashing to 3da2da655208670483d039fce8ca3a57

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 687 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 687)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_643 UNION ALL SELECT pk, col0 FROM view_2_tab4_643
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 687 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 687)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_643 UNION SELECT pk, col0 FROM view_2_tab4_643
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 687 ) AS tab4_643
----
30 values hashing to b3f1ddfddb20f2acadba9061190de845

query I rowsort label-4500-3
SELECT * FROM view_3_tab4_643
----
30 values hashing to b3f1ddfddb20f2acadba9061190de845

query I rowsort label-4500-3
SELECT pk FROM tab4 WHERE col0 > 687
----
30 values hashing to b3f1ddfddb20f2acadba9061190de845

statement ok
DROP VIEW view_1_tab4_643

statement ok
DROP VIEW view_2_tab4_643

statement ok
DROP VIEW view_3_tab4_643

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_644') DROP VIEW view_1_tab0_644

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_644

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_644') DROP VIEW view_2_tab0_644

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_644

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_644') DROP VIEW view_3_tab0_644

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_644

statement ok
CREATE VIEW view_1_tab0_644 AS SELECT pk, col0 FROM tab0 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL)

statement ok
CREATE VIEW view_2_tab0_644 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))

statement ok
CREATE VIEW view_3_tab0_644 AS SELECT pk FROM view_1_tab0_644

query II rowsort label-4600-1
SELECT pk, col0 FROM tab0 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL)
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab0_644
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab0_644
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_644 UNION ALL SELECT pk, col0 FROM view_2_tab0_644
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_644 UNION SELECT pk, col0 FROM view_2_tab0_644
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL) ) AS tab0_644
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab0_644
----

query I rowsort label-4600-3
SELECT pk FROM tab0 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL)
----

statement ok
DROP VIEW view_1_tab0_644

statement ok
DROP VIEW view_2_tab0_644

statement ok
DROP VIEW view_3_tab0_644

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_644') DROP VIEW view_1_tab1_644

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_644

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_644') DROP VIEW view_2_tab1_644

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_644

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_644') DROP VIEW view_3_tab1_644

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_644

statement ok
CREATE VIEW view_1_tab1_644 AS SELECT pk, col0 FROM tab1 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL)

statement ok
CREATE VIEW view_2_tab1_644 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))

statement ok
CREATE VIEW view_3_tab1_644 AS SELECT pk FROM view_1_tab1_644

query II rowsort label-4600-1
SELECT pk, col0 FROM tab1 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL)
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab1_644
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab1_644
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_644 UNION ALL SELECT pk, col0 FROM view_2_tab1_644
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_644 UNION SELECT pk, col0 FROM view_2_tab1_644
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL) ) AS tab1_644
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab1_644
----

query I rowsort label-4600-3
SELECT pk FROM tab1 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL)
----

statement ok
DROP VIEW view_1_tab1_644

statement ok
DROP VIEW view_2_tab1_644

statement ok
DROP VIEW view_3_tab1_644

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_644') DROP VIEW view_1_tab2_644

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_644

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_644') DROP VIEW view_2_tab2_644

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_644

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_644') DROP VIEW view_3_tab2_644

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_644

statement ok
CREATE VIEW view_1_tab2_644 AS SELECT pk, col0 FROM tab2 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL)

statement ok
CREATE VIEW view_2_tab2_644 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))

statement ok
CREATE VIEW view_3_tab2_644 AS SELECT pk FROM view_1_tab2_644

query II rowsort label-4600-1
SELECT pk, col0 FROM tab2 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL)
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab2_644
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab2_644
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_644 UNION ALL SELECT pk, col0 FROM view_2_tab2_644
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_644 UNION SELECT pk, col0 FROM view_2_tab2_644
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL) ) AS tab2_644
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab2_644
----

query I rowsort label-4600-3
SELECT pk FROM tab2 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL)
----

statement ok
DROP VIEW view_1_tab2_644

statement ok
DROP VIEW view_2_tab2_644

statement ok
DROP VIEW view_3_tab2_644

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_644') DROP VIEW view_1_tab3_644

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_644

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_644') DROP VIEW view_2_tab3_644

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_644

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_644') DROP VIEW view_3_tab3_644

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_644

statement ok
CREATE VIEW view_1_tab3_644 AS SELECT pk, col0 FROM tab3 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL)

statement ok
CREATE VIEW view_2_tab3_644 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))

statement ok
CREATE VIEW view_3_tab3_644 AS SELECT pk FROM view_1_tab3_644

query II rowsort label-4600-1
SELECT pk, col0 FROM tab3 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL)
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab3_644
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab3_644
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_644 UNION ALL SELECT pk, col0 FROM view_2_tab3_644
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_644 UNION SELECT pk, col0 FROM view_2_tab3_644
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL) ) AS tab3_644
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab3_644
----

query I rowsort label-4600-3
SELECT pk FROM tab3 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL)
----

statement ok
DROP VIEW view_1_tab3_644

statement ok
DROP VIEW view_2_tab3_644

statement ok
DROP VIEW view_3_tab3_644

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_644') DROP VIEW view_1_tab4_644

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_644

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_644') DROP VIEW view_2_tab4_644

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_644

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_644') DROP VIEW view_3_tab4_644

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_644

statement ok
CREATE VIEW view_1_tab4_644 AS SELECT pk, col0 FROM tab4 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL)

statement ok
CREATE VIEW view_2_tab4_644 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))

statement ok
CREATE VIEW view_3_tab4_644 AS SELECT pk FROM view_1_tab4_644

query II rowsort label-4600-1
SELECT pk, col0 FROM tab4 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL)
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab4_644
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab4_644
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_644 UNION ALL SELECT pk, col0 FROM view_2_tab4_644
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 246 AND col0 > 842 AND (col0 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_644 UNION SELECT pk, col0 FROM view_2_tab4_644
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL) ) AS tab4_644
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab4_644
----

query I rowsort label-4600-3
SELECT pk FROM tab4 WHERE col0 = 246 AND col0 > 842 AND (col0 IS NULL)
----

statement ok
DROP VIEW view_1_tab4_644

statement ok
DROP VIEW view_2_tab4_644

statement ok
DROP VIEW view_3_tab4_644

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_645') DROP VIEW view_1_tab0_645

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_645

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_645') DROP VIEW view_2_tab0_645

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_645

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_645') DROP VIEW view_3_tab0_645

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_645

statement ok
CREATE VIEW view_1_tab0_645 AS SELECT pk, col0 FROM tab0 WHERE col0 = 840 OR col3 > 6

statement ok
CREATE VIEW view_2_tab0_645 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 840 OR col3 > 6)

statement ok
CREATE VIEW view_3_tab0_645 AS SELECT pk FROM view_1_tab0_645

query II rowsort label-4700-1
SELECT pk, col0 FROM tab0 WHERE col0 = 840 OR col3 > 6
----
198 values hashing to 164a1a30240f319e17f432fb131844ae

query II rowsort label-4700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 840 OR col3 > 6)
----
54
596

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab0_645
----
198 values hashing to 164a1a30240f319e17f432fb131844ae

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab0_645
----
54
596

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 840 OR col3 > 6 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 840 OR col3 > 6)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_645 UNION ALL SELECT pk, col0 FROM view_2_tab0_645
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 840 OR col3 > 6 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 840 OR col3 > 6)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_645 UNION SELECT pk, col0 FROM view_2_tab0_645
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 840 OR col3 > 6 ) AS tab0_645
----
99 values hashing to bc756eaad898aee727318756048c0ae2

query I rowsort label-4700-3
SELECT * FROM view_3_tab0_645
----
99 values hashing to bc756eaad898aee727318756048c0ae2

query I rowsort label-4700-3
SELECT pk FROM tab0 WHERE col0 = 840 OR col3 > 6
----
99 values hashing to bc756eaad898aee727318756048c0ae2

statement ok
DROP VIEW view_1_tab0_645

statement ok
DROP VIEW view_2_tab0_645

statement ok
DROP VIEW view_3_tab0_645

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_645') DROP VIEW view_1_tab1_645

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_645

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_645') DROP VIEW view_2_tab1_645

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_645

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_645') DROP VIEW view_3_tab1_645

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_645

statement ok
CREATE VIEW view_1_tab1_645 AS SELECT pk, col0 FROM tab1 WHERE col0 = 840 OR col3 > 6

statement ok
CREATE VIEW view_2_tab1_645 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 840 OR col3 > 6)

statement ok
CREATE VIEW view_3_tab1_645 AS SELECT pk FROM view_1_tab1_645

query II rowsort label-4700-1
SELECT pk, col0 FROM tab1 WHERE col0 = 840 OR col3 > 6
----
198 values hashing to 164a1a30240f319e17f432fb131844ae

query II rowsort label-4700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 840 OR col3 > 6)
----
54
596

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab1_645
----
198 values hashing to 164a1a30240f319e17f432fb131844ae

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab1_645
----
54
596

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 840 OR col3 > 6 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 840 OR col3 > 6)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_645 UNION ALL SELECT pk, col0 FROM view_2_tab1_645
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 840 OR col3 > 6 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 840 OR col3 > 6)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_645 UNION SELECT pk, col0 FROM view_2_tab1_645
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 840 OR col3 > 6 ) AS tab1_645
----
99 values hashing to bc756eaad898aee727318756048c0ae2

query I rowsort label-4700-3
SELECT * FROM view_3_tab1_645
----
99 values hashing to bc756eaad898aee727318756048c0ae2

query I rowsort label-4700-3
SELECT pk FROM tab1 WHERE col0 = 840 OR col3 > 6
----
99 values hashing to bc756eaad898aee727318756048c0ae2

statement ok
DROP VIEW view_1_tab1_645

statement ok
DROP VIEW view_2_tab1_645

statement ok
DROP VIEW view_3_tab1_645

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_645') DROP VIEW view_1_tab2_645

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_645

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_645') DROP VIEW view_2_tab2_645

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_645

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_645') DROP VIEW view_3_tab2_645

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_645

statement ok
CREATE VIEW view_1_tab2_645 AS SELECT pk, col0 FROM tab2 WHERE col0 = 840 OR col3 > 6

statement ok
CREATE VIEW view_2_tab2_645 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 840 OR col3 > 6)

statement ok
CREATE VIEW view_3_tab2_645 AS SELECT pk FROM view_1_tab2_645

query II rowsort label-4700-1
SELECT pk, col0 FROM tab2 WHERE col0 = 840 OR col3 > 6
----
198 values hashing to 164a1a30240f319e17f432fb131844ae

query II rowsort label-4700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 840 OR col3 > 6)
----
54
596

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab2_645
----
198 values hashing to 164a1a30240f319e17f432fb131844ae

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab2_645
----
54
596

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 840 OR col3 > 6 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 840 OR col3 > 6)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_645 UNION ALL SELECT pk, col0 FROM view_2_tab2_645
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 840 OR col3 > 6 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 840 OR col3 > 6)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_645 UNION SELECT pk, col0 FROM view_2_tab2_645
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 840 OR col3 > 6 ) AS tab2_645
----
99 values hashing to bc756eaad898aee727318756048c0ae2

query I rowsort label-4700-3
SELECT * FROM view_3_tab2_645
----
99 values hashing to bc756eaad898aee727318756048c0ae2

query I rowsort label-4700-3
SELECT pk FROM tab2 WHERE col0 = 840 OR col3 > 6
----
99 values hashing to bc756eaad898aee727318756048c0ae2

statement ok
DROP VIEW view_1_tab2_645

statement ok
DROP VIEW view_2_tab2_645

statement ok
DROP VIEW view_3_tab2_645

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_645') DROP VIEW view_1_tab3_645

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_645

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_645') DROP VIEW view_2_tab3_645

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_645

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_645') DROP VIEW view_3_tab3_645

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_645

statement ok
CREATE VIEW view_1_tab3_645 AS SELECT pk, col0 FROM tab3 WHERE col0 = 840 OR col3 > 6

statement ok
CREATE VIEW view_2_tab3_645 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 840 OR col3 > 6)

statement ok
CREATE VIEW view_3_tab3_645 AS SELECT pk FROM view_1_tab3_645

query II rowsort label-4700-1
SELECT pk, col0 FROM tab3 WHERE col0 = 840 OR col3 > 6
----
198 values hashing to 164a1a30240f319e17f432fb131844ae

query II rowsort label-4700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 840 OR col3 > 6)
----
54
596

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab3_645
----
198 values hashing to 164a1a30240f319e17f432fb131844ae

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab3_645
----
54
596

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 840 OR col3 > 6 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 840 OR col3 > 6)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_645 UNION ALL SELECT pk, col0 FROM view_2_tab3_645
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 840 OR col3 > 6 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 840 OR col3 > 6)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_645 UNION SELECT pk, col0 FROM view_2_tab3_645
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 840 OR col3 > 6 ) AS tab3_645
----
99 values hashing to bc756eaad898aee727318756048c0ae2

query I rowsort label-4700-3
SELECT * FROM view_3_tab3_645
----
99 values hashing to bc756eaad898aee727318756048c0ae2

query I rowsort label-4700-3
SELECT pk FROM tab3 WHERE col0 = 840 OR col3 > 6
----
99 values hashing to bc756eaad898aee727318756048c0ae2

statement ok
DROP VIEW view_1_tab3_645

statement ok
DROP VIEW view_2_tab3_645

statement ok
DROP VIEW view_3_tab3_645

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_645') DROP VIEW view_1_tab4_645

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_645

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_645') DROP VIEW view_2_tab4_645

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_645

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_645') DROP VIEW view_3_tab4_645

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_645

statement ok
CREATE VIEW view_1_tab4_645 AS SELECT pk, col0 FROM tab4 WHERE col0 = 840 OR col3 > 6

statement ok
CREATE VIEW view_2_tab4_645 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 840 OR col3 > 6)

statement ok
CREATE VIEW view_3_tab4_645 AS SELECT pk FROM view_1_tab4_645

query II rowsort label-4700-1
SELECT pk, col0 FROM tab4 WHERE col0 = 840 OR col3 > 6
----
198 values hashing to 164a1a30240f319e17f432fb131844ae

query II rowsort label-4700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 840 OR col3 > 6)
----
54
596

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab4_645
----
198 values hashing to 164a1a30240f319e17f432fb131844ae

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab4_645
----
54
596

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 840 OR col3 > 6 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 840 OR col3 > 6)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_645 UNION ALL SELECT pk, col0 FROM view_2_tab4_645
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 840 OR col3 > 6 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 840 OR col3 > 6)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_645 UNION SELECT pk, col0 FROM view_2_tab4_645
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 840 OR col3 > 6 ) AS tab4_645
----
99 values hashing to bc756eaad898aee727318756048c0ae2

query I rowsort label-4700-3
SELECT * FROM view_3_tab4_645
----
99 values hashing to bc756eaad898aee727318756048c0ae2

query I rowsort label-4700-3
SELECT pk FROM tab4 WHERE col0 = 840 OR col3 > 6
----
99 values hashing to bc756eaad898aee727318756048c0ae2

statement ok
DROP VIEW view_1_tab4_645

statement ok
DROP VIEW view_2_tab4_645

statement ok
DROP VIEW view_3_tab4_645

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_646') DROP VIEW view_1_tab0_646

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_646

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_646') DROP VIEW view_2_tab0_646

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_646

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_646') DROP VIEW view_3_tab0_646

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_646

statement ok
CREATE VIEW view_1_tab0_646 AS SELECT pk, col0 FROM tab0 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL)

statement ok
CREATE VIEW view_2_tab0_646 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))

statement ok
CREATE VIEW view_3_tab0_646 AS SELECT pk FROM view_1_tab0_646

query II rowsort label-4800-1
SELECT pk, col0 FROM tab0 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL)
----

query II rowsort label-4800-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab0_646
----

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab0_646
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_646 UNION ALL SELECT pk, col0 FROM view_2_tab0_646
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_646 UNION SELECT pk, col0 FROM view_2_tab0_646
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL) ) AS tab0_646
----

query I rowsort label-4800-3
SELECT * FROM view_3_tab0_646
----

query I rowsort label-4800-3
SELECT pk FROM tab0 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL)
----

statement ok
DROP VIEW view_1_tab0_646

statement ok
DROP VIEW view_2_tab0_646

statement ok
DROP VIEW view_3_tab0_646

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_646') DROP VIEW view_1_tab1_646

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_646

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_646') DROP VIEW view_2_tab1_646

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_646

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_646') DROP VIEW view_3_tab1_646

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_646

statement ok
CREATE VIEW view_1_tab1_646 AS SELECT pk, col0 FROM tab1 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL)

statement ok
CREATE VIEW view_2_tab1_646 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))

statement ok
CREATE VIEW view_3_tab1_646 AS SELECT pk FROM view_1_tab1_646

query II rowsort label-4800-1
SELECT pk, col0 FROM tab1 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL)
----

query II rowsort label-4800-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab1_646
----

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab1_646
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_646 UNION ALL SELECT pk, col0 FROM view_2_tab1_646
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_646 UNION SELECT pk, col0 FROM view_2_tab1_646
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL) ) AS tab1_646
----

query I rowsort label-4800-3
SELECT * FROM view_3_tab1_646
----

query I rowsort label-4800-3
SELECT pk FROM tab1 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL)
----

statement ok
DROP VIEW view_1_tab1_646

statement ok
DROP VIEW view_2_tab1_646

statement ok
DROP VIEW view_3_tab1_646

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_646') DROP VIEW view_1_tab2_646

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_646

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_646') DROP VIEW view_2_tab2_646

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_646

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_646') DROP VIEW view_3_tab2_646

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_646

statement ok
CREATE VIEW view_1_tab2_646 AS SELECT pk, col0 FROM tab2 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL)

statement ok
CREATE VIEW view_2_tab2_646 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))

statement ok
CREATE VIEW view_3_tab2_646 AS SELECT pk FROM view_1_tab2_646

query II rowsort label-4800-1
SELECT pk, col0 FROM tab2 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL)
----

query II rowsort label-4800-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab2_646
----

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab2_646
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_646 UNION ALL SELECT pk, col0 FROM view_2_tab2_646
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_646 UNION SELECT pk, col0 FROM view_2_tab2_646
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL) ) AS tab2_646
----

query I rowsort label-4800-3
SELECT * FROM view_3_tab2_646
----

query I rowsort label-4800-3
SELECT pk FROM tab2 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL)
----

statement ok
DROP VIEW view_1_tab2_646

statement ok
DROP VIEW view_2_tab2_646

statement ok
DROP VIEW view_3_tab2_646

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_646') DROP VIEW view_1_tab3_646

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_646

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_646') DROP VIEW view_2_tab3_646

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_646

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_646') DROP VIEW view_3_tab3_646

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_646

statement ok
CREATE VIEW view_1_tab3_646 AS SELECT pk, col0 FROM tab3 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL)

statement ok
CREATE VIEW view_2_tab3_646 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))

statement ok
CREATE VIEW view_3_tab3_646 AS SELECT pk FROM view_1_tab3_646

query II rowsort label-4800-1
SELECT pk, col0 FROM tab3 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL)
----

query II rowsort label-4800-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab3_646
----

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab3_646
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_646 UNION ALL SELECT pk, col0 FROM view_2_tab3_646
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_646 UNION SELECT pk, col0 FROM view_2_tab3_646
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL) ) AS tab3_646
----

query I rowsort label-4800-3
SELECT * FROM view_3_tab3_646
----

query I rowsort label-4800-3
SELECT pk FROM tab3 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL)
----

statement ok
DROP VIEW view_1_tab3_646

statement ok
DROP VIEW view_2_tab3_646

statement ok
DROP VIEW view_3_tab3_646

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_646') DROP VIEW view_1_tab4_646

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_646

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_646') DROP VIEW view_2_tab4_646

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_646

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_646') DROP VIEW view_3_tab4_646

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_646

statement ok
CREATE VIEW view_1_tab4_646 AS SELECT pk, col0 FROM tab4 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL)

statement ok
CREATE VIEW view_2_tab4_646 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))

statement ok
CREATE VIEW view_3_tab4_646 AS SELECT pk FROM view_1_tab4_646

query II rowsort label-4800-1
SELECT pk, col0 FROM tab4 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL)
----

query II rowsort label-4800-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab4_646
----

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab4_646
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_646 UNION ALL SELECT pk, col0 FROM view_2_tab4_646
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_646 UNION SELECT pk, col0 FROM view_2_tab4_646
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL) ) AS tab4_646
----

query I rowsort label-4800-3
SELECT * FROM view_3_tab4_646
----

query I rowsort label-4800-3
SELECT pk FROM tab4 WHERE ((col3 > 748 OR (col0 >= 346) AND col4 < 104.89 OR (col4 <= 760.93) AND ((col4 >= 248.77 OR col3 >= 558)) AND col0 < 864) AND col3 <= 167 AND col3 IS NULL)
----

statement ok
DROP VIEW view_1_tab4_646

statement ok
DROP VIEW view_2_tab4_646

statement ok
DROP VIEW view_3_tab4_646

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_647') DROP VIEW view_1_tab0_647

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_647

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_647') DROP VIEW view_2_tab0_647

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_647

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_647') DROP VIEW view_3_tab0_647

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_647

statement ok
CREATE VIEW view_1_tab0_647 AS SELECT pk, col0 FROM tab0 WHERE col3 < 407

statement ok
CREATE VIEW view_2_tab0_647 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 407)

statement ok
CREATE VIEW view_3_tab0_647 AS SELECT pk FROM view_1_tab0_647

query II rowsort label-4900-1
SELECT pk, col0 FROM tab0 WHERE col3 < 407
----
98 values hashing to f7c5ea8ccfc7429000e6ac53cc63c7cb

query II rowsort label-4900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 407)
----
102 values hashing to 4ad6cbd7eacdb01d45479e44befc6b4b

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab0_647
----
98 values hashing to f7c5ea8ccfc7429000e6ac53cc63c7cb

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab0_647
----
102 values hashing to 4ad6cbd7eacdb01d45479e44befc6b4b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 407 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 407)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_647 UNION ALL SELECT pk, col0 FROM view_2_tab0_647
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 407 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 407)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_647 UNION SELECT pk, col0 FROM view_2_tab0_647
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 < 407 ) AS tab0_647
----
49 values hashing to 73403bb74e8462eae58bc1305a0890da

query I rowsort label-4900-3
SELECT * FROM view_3_tab0_647
----
49 values hashing to 73403bb74e8462eae58bc1305a0890da

query I rowsort label-4900-3
SELECT pk FROM tab0 WHERE col3 < 407
----
49 values hashing to 73403bb74e8462eae58bc1305a0890da

statement ok
DROP VIEW view_1_tab0_647

statement ok
DROP VIEW view_2_tab0_647

statement ok
DROP VIEW view_3_tab0_647

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_647') DROP VIEW view_1_tab1_647

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_647

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_647') DROP VIEW view_2_tab1_647

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_647

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_647') DROP VIEW view_3_tab1_647

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_647

statement ok
CREATE VIEW view_1_tab1_647 AS SELECT pk, col0 FROM tab1 WHERE col3 < 407

statement ok
CREATE VIEW view_2_tab1_647 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 407)

statement ok
CREATE VIEW view_3_tab1_647 AS SELECT pk FROM view_1_tab1_647

query II rowsort label-4900-1
SELECT pk, col0 FROM tab1 WHERE col3 < 407
----
98 values hashing to f7c5ea8ccfc7429000e6ac53cc63c7cb

query II rowsort label-4900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 407)
----
102 values hashing to 4ad6cbd7eacdb01d45479e44befc6b4b

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab1_647
----
98 values hashing to f7c5ea8ccfc7429000e6ac53cc63c7cb

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab1_647
----
102 values hashing to 4ad6cbd7eacdb01d45479e44befc6b4b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 407 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 407)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_647 UNION ALL SELECT pk, col0 FROM view_2_tab1_647
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 407 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 407)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_647 UNION SELECT pk, col0 FROM view_2_tab1_647
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 < 407 ) AS tab1_647
----
49 values hashing to 73403bb74e8462eae58bc1305a0890da

query I rowsort label-4900-3
SELECT * FROM view_3_tab1_647
----
49 values hashing to 73403bb74e8462eae58bc1305a0890da

query I rowsort label-4900-3
SELECT pk FROM tab1 WHERE col3 < 407
----
49 values hashing to 73403bb74e8462eae58bc1305a0890da

statement ok
DROP VIEW view_1_tab1_647

statement ok
DROP VIEW view_2_tab1_647

statement ok
DROP VIEW view_3_tab1_647

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_647') DROP VIEW view_1_tab2_647

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_647

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_647') DROP VIEW view_2_tab2_647

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_647

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_647') DROP VIEW view_3_tab2_647

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_647

statement ok
CREATE VIEW view_1_tab2_647 AS SELECT pk, col0 FROM tab2 WHERE col3 < 407

statement ok
CREATE VIEW view_2_tab2_647 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 407)

statement ok
CREATE VIEW view_3_tab2_647 AS SELECT pk FROM view_1_tab2_647

query II rowsort label-4900-1
SELECT pk, col0 FROM tab2 WHERE col3 < 407
----
98 values hashing to f7c5ea8ccfc7429000e6ac53cc63c7cb

query II rowsort label-4900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 407)
----
102 values hashing to 4ad6cbd7eacdb01d45479e44befc6b4b

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab2_647
----
98 values hashing to f7c5ea8ccfc7429000e6ac53cc63c7cb

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab2_647
----
102 values hashing to 4ad6cbd7eacdb01d45479e44befc6b4b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 407 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 407)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_647 UNION ALL SELECT pk, col0 FROM view_2_tab2_647
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 407 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 407)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_647 UNION SELECT pk, col0 FROM view_2_tab2_647
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 < 407 ) AS tab2_647
----
49 values hashing to 73403bb74e8462eae58bc1305a0890da

query I rowsort label-4900-3
SELECT * FROM view_3_tab2_647
----
49 values hashing to 73403bb74e8462eae58bc1305a0890da

query I rowsort label-4900-3
SELECT pk FROM tab2 WHERE col3 < 407
----
49 values hashing to 73403bb74e8462eae58bc1305a0890da

statement ok
DROP VIEW view_1_tab2_647

statement ok
DROP VIEW view_2_tab2_647

statement ok
DROP VIEW view_3_tab2_647

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_647') DROP VIEW view_1_tab3_647

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_647

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_647') DROP VIEW view_2_tab3_647

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_647

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_647') DROP VIEW view_3_tab3_647

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_647

statement ok
CREATE VIEW view_1_tab3_647 AS SELECT pk, col0 FROM tab3 WHERE col3 < 407

statement ok
CREATE VIEW view_2_tab3_647 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 407)

statement ok
CREATE VIEW view_3_tab3_647 AS SELECT pk FROM view_1_tab3_647

query II rowsort label-4900-1
SELECT pk, col0 FROM tab3 WHERE col3 < 407
----
98 values hashing to f7c5ea8ccfc7429000e6ac53cc63c7cb

query II rowsort label-4900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 407)
----
102 values hashing to 4ad6cbd7eacdb01d45479e44befc6b4b

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab3_647
----
98 values hashing to f7c5ea8ccfc7429000e6ac53cc63c7cb

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab3_647
----
102 values hashing to 4ad6cbd7eacdb01d45479e44befc6b4b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 407 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 407)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_647 UNION ALL SELECT pk, col0 FROM view_2_tab3_647
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 407 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 407)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_647 UNION SELECT pk, col0 FROM view_2_tab3_647
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 < 407 ) AS tab3_647
----
49 values hashing to 73403bb74e8462eae58bc1305a0890da

query I rowsort label-4900-3
SELECT * FROM view_3_tab3_647
----
49 values hashing to 73403bb74e8462eae58bc1305a0890da

query I rowsort label-4900-3
SELECT pk FROM tab3 WHERE col3 < 407
----
49 values hashing to 73403bb74e8462eae58bc1305a0890da

statement ok
DROP VIEW view_1_tab3_647

statement ok
DROP VIEW view_2_tab3_647

statement ok
DROP VIEW view_3_tab3_647

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_647') DROP VIEW view_1_tab4_647

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_647

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_647') DROP VIEW view_2_tab4_647

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_647

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_647') DROP VIEW view_3_tab4_647

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_647

statement ok
CREATE VIEW view_1_tab4_647 AS SELECT pk, col0 FROM tab4 WHERE col3 < 407

statement ok
CREATE VIEW view_2_tab4_647 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 407)

statement ok
CREATE VIEW view_3_tab4_647 AS SELECT pk FROM view_1_tab4_647

query II rowsort label-4900-1
SELECT pk, col0 FROM tab4 WHERE col3 < 407
----
98 values hashing to f7c5ea8ccfc7429000e6ac53cc63c7cb

query II rowsort label-4900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 407)
----
102 values hashing to 4ad6cbd7eacdb01d45479e44befc6b4b

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab4_647
----
98 values hashing to f7c5ea8ccfc7429000e6ac53cc63c7cb

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab4_647
----
102 values hashing to 4ad6cbd7eacdb01d45479e44befc6b4b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 407 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 407)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_647 UNION ALL SELECT pk, col0 FROM view_2_tab4_647
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 407 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 407)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_647 UNION SELECT pk, col0 FROM view_2_tab4_647
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 < 407 ) AS tab4_647
----
49 values hashing to 73403bb74e8462eae58bc1305a0890da

query I rowsort label-4900-3
SELECT * FROM view_3_tab4_647
----
49 values hashing to 73403bb74e8462eae58bc1305a0890da

query I rowsort label-4900-3
SELECT pk FROM tab4 WHERE col3 < 407
----
49 values hashing to 73403bb74e8462eae58bc1305a0890da

statement ok
DROP VIEW view_1_tab4_647

statement ok
DROP VIEW view_2_tab4_647

statement ok
DROP VIEW view_3_tab4_647

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_648') DROP VIEW view_1_tab0_648

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_648

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_648') DROP VIEW view_2_tab0_648

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_648

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_648') DROP VIEW view_3_tab0_648

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_648

statement ok
CREATE VIEW view_1_tab0_648 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 317) OR (col3 > 940)

statement ok
CREATE VIEW view_2_tab0_648 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 317) OR (col3 > 940))

statement ok
CREATE VIEW view_3_tab0_648 AS SELECT pk FROM view_1_tab0_648

query II rowsort label-5000-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 317) OR (col3 > 940)
----
78 values hashing to d5dd6bf099201fb30511609fef960457

query II rowsort label-5000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 317) OR (col3 > 940))
----
122 values hashing to 75bd0649a5f1e0bc9f36647f34712cf3

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab0_648
----
78 values hashing to d5dd6bf099201fb30511609fef960457

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab0_648
----
122 values hashing to 75bd0649a5f1e0bc9f36647f34712cf3

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 317) OR (col3 > 940) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 317) OR (col3 > 940))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_648 UNION ALL SELECT pk, col0 FROM view_2_tab0_648
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 317) OR (col3 > 940) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 317) OR (col3 > 940))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_648 UNION SELECT pk, col0 FROM view_2_tab0_648
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 317) OR (col3 > 940) ) AS tab0_648
----
39 values hashing to 291b958582867896d917374351bef51a

query I rowsort label-5000-3
SELECT * FROM view_3_tab0_648
----
39 values hashing to 291b958582867896d917374351bef51a

query I rowsort label-5000-3
SELECT pk FROM tab0 WHERE (col0 < 317) OR (col3 > 940)
----
39 values hashing to 291b958582867896d917374351bef51a

statement ok
DROP VIEW view_1_tab0_648

statement ok
DROP VIEW view_2_tab0_648

statement ok
DROP VIEW view_3_tab0_648

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_648') DROP VIEW view_1_tab1_648

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_648

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_648') DROP VIEW view_2_tab1_648

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_648

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_648') DROP VIEW view_3_tab1_648

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_648

statement ok
CREATE VIEW view_1_tab1_648 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 317) OR (col3 > 940)

statement ok
CREATE VIEW view_2_tab1_648 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 317) OR (col3 > 940))

statement ok
CREATE VIEW view_3_tab1_648 AS SELECT pk FROM view_1_tab1_648

query II rowsort label-5000-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 317) OR (col3 > 940)
----
78 values hashing to d5dd6bf099201fb30511609fef960457

query II rowsort label-5000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 317) OR (col3 > 940))
----
122 values hashing to 75bd0649a5f1e0bc9f36647f34712cf3

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab1_648
----
78 values hashing to d5dd6bf099201fb30511609fef960457

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab1_648
----
122 values hashing to 75bd0649a5f1e0bc9f36647f34712cf3

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 317) OR (col3 > 940) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 317) OR (col3 > 940))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_648 UNION ALL SELECT pk, col0 FROM view_2_tab1_648
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 317) OR (col3 > 940) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 317) OR (col3 > 940))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_648 UNION SELECT pk, col0 FROM view_2_tab1_648
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 317) OR (col3 > 940) ) AS tab1_648
----
39 values hashing to 291b958582867896d917374351bef51a

query I rowsort label-5000-3
SELECT * FROM view_3_tab1_648
----
39 values hashing to 291b958582867896d917374351bef51a

query I rowsort label-5000-3
SELECT pk FROM tab1 WHERE (col0 < 317) OR (col3 > 940)
----
39 values hashing to 291b958582867896d917374351bef51a

statement ok
DROP VIEW view_1_tab1_648

statement ok
DROP VIEW view_2_tab1_648

statement ok
DROP VIEW view_3_tab1_648

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_648') DROP VIEW view_1_tab2_648

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_648

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_648') DROP VIEW view_2_tab2_648

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_648

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_648') DROP VIEW view_3_tab2_648

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_648

statement ok
CREATE VIEW view_1_tab2_648 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 317) OR (col3 > 940)

statement ok
CREATE VIEW view_2_tab2_648 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 317) OR (col3 > 940))

statement ok
CREATE VIEW view_3_tab2_648 AS SELECT pk FROM view_1_tab2_648

query II rowsort label-5000-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 317) OR (col3 > 940)
----
78 values hashing to d5dd6bf099201fb30511609fef960457

query II rowsort label-5000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 317) OR (col3 > 940))
----
122 values hashing to 75bd0649a5f1e0bc9f36647f34712cf3

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab2_648
----
78 values hashing to d5dd6bf099201fb30511609fef960457

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab2_648
----
122 values hashing to 75bd0649a5f1e0bc9f36647f34712cf3

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 317) OR (col3 > 940) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 317) OR (col3 > 940))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_648 UNION ALL SELECT pk, col0 FROM view_2_tab2_648
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 317) OR (col3 > 940) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 317) OR (col3 > 940))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_648 UNION SELECT pk, col0 FROM view_2_tab2_648
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 317) OR (col3 > 940) ) AS tab2_648
----
39 values hashing to 291b958582867896d917374351bef51a

query I rowsort label-5000-3
SELECT * FROM view_3_tab2_648
----
39 values hashing to 291b958582867896d917374351bef51a

query I rowsort label-5000-3
SELECT pk FROM tab2 WHERE (col0 < 317) OR (col3 > 940)
----
39 values hashing to 291b958582867896d917374351bef51a

statement ok
DROP VIEW view_1_tab2_648

statement ok
DROP VIEW view_2_tab2_648

statement ok
DROP VIEW view_3_tab2_648

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_648') DROP VIEW view_1_tab3_648

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_648

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_648') DROP VIEW view_2_tab3_648

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_648

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_648') DROP VIEW view_3_tab3_648

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_648

statement ok
CREATE VIEW view_1_tab3_648 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 317) OR (col3 > 940)

statement ok
CREATE VIEW view_2_tab3_648 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 317) OR (col3 > 940))

statement ok
CREATE VIEW view_3_tab3_648 AS SELECT pk FROM view_1_tab3_648

query II rowsort label-5000-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 317) OR (col3 > 940)
----
78 values hashing to d5dd6bf099201fb30511609fef960457

query II rowsort label-5000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 317) OR (col3 > 940))
----
122 values hashing to 75bd0649a5f1e0bc9f36647f34712cf3

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab3_648
----
78 values hashing to d5dd6bf099201fb30511609fef960457

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab3_648
----
122 values hashing to 75bd0649a5f1e0bc9f36647f34712cf3

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 317) OR (col3 > 940) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 317) OR (col3 > 940))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_648 UNION ALL SELECT pk, col0 FROM view_2_tab3_648
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 317) OR (col3 > 940) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 317) OR (col3 > 940))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_648 UNION SELECT pk, col0 FROM view_2_tab3_648
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 317) OR (col3 > 940) ) AS tab3_648
----
39 values hashing to 291b958582867896d917374351bef51a

query I rowsort label-5000-3
SELECT * FROM view_3_tab3_648
----
39 values hashing to 291b958582867896d917374351bef51a

query I rowsort label-5000-3
SELECT pk FROM tab3 WHERE (col0 < 317) OR (col3 > 940)
----
39 values hashing to 291b958582867896d917374351bef51a

statement ok
DROP VIEW view_1_tab3_648

statement ok
DROP VIEW view_2_tab3_648

statement ok
DROP VIEW view_3_tab3_648

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_648') DROP VIEW view_1_tab4_648

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_648

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_648') DROP VIEW view_2_tab4_648

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_648

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_648') DROP VIEW view_3_tab4_648

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_648

statement ok
CREATE VIEW view_1_tab4_648 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 317) OR (col3 > 940)

statement ok
CREATE VIEW view_2_tab4_648 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 317) OR (col3 > 940))

statement ok
CREATE VIEW view_3_tab4_648 AS SELECT pk FROM view_1_tab4_648

query II rowsort label-5000-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 317) OR (col3 > 940)
----
78 values hashing to d5dd6bf099201fb30511609fef960457

query II rowsort label-5000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 317) OR (col3 > 940))
----
122 values hashing to 75bd0649a5f1e0bc9f36647f34712cf3

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab4_648
----
78 values hashing to d5dd6bf099201fb30511609fef960457

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab4_648
----
122 values hashing to 75bd0649a5f1e0bc9f36647f34712cf3

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 317) OR (col3 > 940) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 317) OR (col3 > 940))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_648 UNION ALL SELECT pk, col0 FROM view_2_tab4_648
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 317) OR (col3 > 940) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 317) OR (col3 > 940))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_648 UNION SELECT pk, col0 FROM view_2_tab4_648
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 317) OR (col3 > 940) ) AS tab4_648
----
39 values hashing to 291b958582867896d917374351bef51a

query I rowsort label-5000-3
SELECT * FROM view_3_tab4_648
----
39 values hashing to 291b958582867896d917374351bef51a

query I rowsort label-5000-3
SELECT pk FROM tab4 WHERE (col0 < 317) OR (col3 > 940)
----
39 values hashing to 291b958582867896d917374351bef51a

statement ok
DROP VIEW view_1_tab4_648

statement ok
DROP VIEW view_2_tab4_648

statement ok
DROP VIEW view_3_tab4_648

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_649') DROP VIEW view_1_tab0_649

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_649

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_649') DROP VIEW view_2_tab0_649

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_649

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_649') DROP VIEW view_3_tab0_649

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_649

statement ok
CREATE VIEW view_1_tab0_649 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456)

statement ok
CREATE VIEW view_2_tab0_649 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))

statement ok
CREATE VIEW view_3_tab0_649 AS SELECT pk FROM view_1_tab0_649

query II rowsort label-5100-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456)
----
194 values hashing to 652c4a11100b0de14e5c4fb631f23d27

query II rowsort label-5100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))
----
34
26
49
0
89
27

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab0_649
----
194 values hashing to 652c4a11100b0de14e5c4fb631f23d27

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab0_649
----
34
26
49
0
89
27

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_649 UNION ALL SELECT pk, col0 FROM view_2_tab0_649
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_649 UNION SELECT pk, col0 FROM view_2_tab0_649
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456) ) AS tab0_649
----
97 values hashing to 2ce647298726de968583c5befcabf6b0

query I rowsort label-5100-3
SELECT * FROM view_3_tab0_649
----
97 values hashing to 2ce647298726de968583c5befcabf6b0

query I rowsort label-5100-3
SELECT pk FROM tab0 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456)
----
97 values hashing to 2ce647298726de968583c5befcabf6b0

statement ok
DROP VIEW view_1_tab0_649

statement ok
DROP VIEW view_2_tab0_649

statement ok
DROP VIEW view_3_tab0_649

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_649') DROP VIEW view_1_tab1_649

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_649

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_649') DROP VIEW view_2_tab1_649

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_649

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_649') DROP VIEW view_3_tab1_649

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_649

statement ok
CREATE VIEW view_1_tab1_649 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456)

statement ok
CREATE VIEW view_2_tab1_649 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))

statement ok
CREATE VIEW view_3_tab1_649 AS SELECT pk FROM view_1_tab1_649

query II rowsort label-5100-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456)
----
194 values hashing to 652c4a11100b0de14e5c4fb631f23d27

query II rowsort label-5100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))
----
34
26
49
0
89
27

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab1_649
----
194 values hashing to 652c4a11100b0de14e5c4fb631f23d27

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab1_649
----
34
26
49
0
89
27

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_649 UNION ALL SELECT pk, col0 FROM view_2_tab1_649
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_649 UNION SELECT pk, col0 FROM view_2_tab1_649
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456) ) AS tab1_649
----
97 values hashing to 2ce647298726de968583c5befcabf6b0

query I rowsort label-5100-3
SELECT * FROM view_3_tab1_649
----
97 values hashing to 2ce647298726de968583c5befcabf6b0

query I rowsort label-5100-3
SELECT pk FROM tab1 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456)
----
97 values hashing to 2ce647298726de968583c5befcabf6b0

statement ok
DROP VIEW view_1_tab1_649

statement ok
DROP VIEW view_2_tab1_649

statement ok
DROP VIEW view_3_tab1_649

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_649') DROP VIEW view_1_tab2_649

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_649

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_649') DROP VIEW view_2_tab2_649

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_649

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_649') DROP VIEW view_3_tab2_649

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_649

statement ok
CREATE VIEW view_1_tab2_649 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456)

statement ok
CREATE VIEW view_2_tab2_649 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))

statement ok
CREATE VIEW view_3_tab2_649 AS SELECT pk FROM view_1_tab2_649

query II rowsort label-5100-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456)
----
194 values hashing to 652c4a11100b0de14e5c4fb631f23d27

query II rowsort label-5100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))
----
34
26
49
0
89
27

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab2_649
----
194 values hashing to 652c4a11100b0de14e5c4fb631f23d27

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab2_649
----
34
26
49
0
89
27

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_649 UNION ALL SELECT pk, col0 FROM view_2_tab2_649
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_649 UNION SELECT pk, col0 FROM view_2_tab2_649
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456) ) AS tab2_649
----
97 values hashing to 2ce647298726de968583c5befcabf6b0

query I rowsort label-5100-3
SELECT * FROM view_3_tab2_649
----
97 values hashing to 2ce647298726de968583c5befcabf6b0

query I rowsort label-5100-3
SELECT pk FROM tab2 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456)
----
97 values hashing to 2ce647298726de968583c5befcabf6b0

statement ok
DROP VIEW view_1_tab2_649

statement ok
DROP VIEW view_2_tab2_649

statement ok
DROP VIEW view_3_tab2_649

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_649') DROP VIEW view_1_tab3_649

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_649

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_649') DROP VIEW view_2_tab3_649

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_649

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_649') DROP VIEW view_3_tab3_649

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_649

statement ok
CREATE VIEW view_1_tab3_649 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456)

statement ok
CREATE VIEW view_2_tab3_649 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))

statement ok
CREATE VIEW view_3_tab3_649 AS SELECT pk FROM view_1_tab3_649

query II rowsort label-5100-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456)
----
194 values hashing to 652c4a11100b0de14e5c4fb631f23d27

query II rowsort label-5100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))
----
34
26
49
0
89
27

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab3_649
----
194 values hashing to 652c4a11100b0de14e5c4fb631f23d27

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab3_649
----
34
26
49
0
89
27

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_649 UNION ALL SELECT pk, col0 FROM view_2_tab3_649
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_649 UNION SELECT pk, col0 FROM view_2_tab3_649
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456) ) AS tab3_649
----
97 values hashing to 2ce647298726de968583c5befcabf6b0

query I rowsort label-5100-3
SELECT * FROM view_3_tab3_649
----
97 values hashing to 2ce647298726de968583c5befcabf6b0

query I rowsort label-5100-3
SELECT pk FROM tab3 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456)
----
97 values hashing to 2ce647298726de968583c5befcabf6b0

statement ok
DROP VIEW view_1_tab3_649

statement ok
DROP VIEW view_2_tab3_649

statement ok
DROP VIEW view_3_tab3_649

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_649') DROP VIEW view_1_tab4_649

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_649

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_649') DROP VIEW view_2_tab4_649

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_649

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_649') DROP VIEW view_3_tab4_649

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_649

statement ok
CREATE VIEW view_1_tab4_649 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456)

statement ok
CREATE VIEW view_2_tab4_649 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))

statement ok
CREATE VIEW view_3_tab4_649 AS SELECT pk FROM view_1_tab4_649

query II rowsort label-5100-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456)
----
194 values hashing to 652c4a11100b0de14e5c4fb631f23d27

query II rowsort label-5100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))
----
34
26
49
0
89
27

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab4_649
----
194 values hashing to 652c4a11100b0de14e5c4fb631f23d27

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab4_649
----
34
26
49
0
89
27

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_649 UNION ALL SELECT pk, col0 FROM view_2_tab4_649
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_649 UNION SELECT pk, col0 FROM view_2_tab4_649
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456) ) AS tab4_649
----
97 values hashing to 2ce647298726de968583c5befcabf6b0

query I rowsort label-5100-3
SELECT * FROM view_3_tab4_649
----
97 values hashing to 2ce647298726de968583c5befcabf6b0

query I rowsort label-5100-3
SELECT pk FROM tab4 WHERE col3 >= 766 OR col1 < 348.94 AND ((((col4 IN (307.68,283.25)))) AND col0 BETWEEN 467 AND 692) OR (col3 > 509) OR col3 >= 50 AND (col1 < 661.95 AND col4 IN (719.91,999.82,621.73)) OR col3 <= 75 OR (col0 > 31 OR col3 > 456)
----
97 values hashing to 2ce647298726de968583c5befcabf6b0

statement ok
DROP VIEW view_1_tab4_649

statement ok
DROP VIEW view_2_tab4_649

statement ok
DROP VIEW view_3_tab4_649

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_650') DROP VIEW view_1_tab0_650

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_650

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_650') DROP VIEW view_2_tab0_650

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_650

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_650') DROP VIEW view_3_tab0_650

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_650

statement ok
CREATE VIEW view_1_tab0_650 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 807 AND col0 > 131

statement ok
CREATE VIEW view_2_tab0_650 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 807 AND col0 > 131)

statement ok
CREATE VIEW view_3_tab0_650 AS SELECT pk FROM view_1_tab0_650

query II rowsort label-5200-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 807 AND col0 > 131
----
132 values hashing to cd24ba442275dda23019c0892150ef5c

query II rowsort label-5200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 807 AND col0 > 131)
----
68 values hashing to 61499eefd042b724a58dbd6812d22594

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab0_650
----
132 values hashing to cd24ba442275dda23019c0892150ef5c

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab0_650
----
68 values hashing to 61499eefd042b724a58dbd6812d22594

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 807 AND col0 > 131 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 807 AND col0 > 131)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_650 UNION ALL SELECT pk, col0 FROM view_2_tab0_650
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 807 AND col0 > 131 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 807 AND col0 > 131)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_650 UNION SELECT pk, col0 FROM view_2_tab0_650
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 807 AND col0 > 131 ) AS tab0_650
----
66 values hashing to d45f9df347eb37037587423516558cc5

query I rowsort label-5200-3
SELECT * FROM view_3_tab0_650
----
66 values hashing to d45f9df347eb37037587423516558cc5

query I rowsort label-5200-3
SELECT pk FROM tab0 WHERE col0 <= 807 AND col0 > 131
----
66 values hashing to d45f9df347eb37037587423516558cc5

statement ok
DROP VIEW view_1_tab0_650

statement ok
DROP VIEW view_2_tab0_650

statement ok
DROP VIEW view_3_tab0_650

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_650') DROP VIEW view_1_tab1_650

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_650

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_650') DROP VIEW view_2_tab1_650

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_650

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_650') DROP VIEW view_3_tab1_650

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_650

statement ok
CREATE VIEW view_1_tab1_650 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 807 AND col0 > 131

statement ok
CREATE VIEW view_2_tab1_650 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 807 AND col0 > 131)

statement ok
CREATE VIEW view_3_tab1_650 AS SELECT pk FROM view_1_tab1_650

query II rowsort label-5200-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 807 AND col0 > 131
----
132 values hashing to cd24ba442275dda23019c0892150ef5c

query II rowsort label-5200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 807 AND col0 > 131)
----
68 values hashing to 61499eefd042b724a58dbd6812d22594

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab1_650
----
132 values hashing to cd24ba442275dda23019c0892150ef5c

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab1_650
----
68 values hashing to 61499eefd042b724a58dbd6812d22594

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 807 AND col0 > 131 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 807 AND col0 > 131)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_650 UNION ALL SELECT pk, col0 FROM view_2_tab1_650
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 807 AND col0 > 131 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 807 AND col0 > 131)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_650 UNION SELECT pk, col0 FROM view_2_tab1_650
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 807 AND col0 > 131 ) AS tab1_650
----
66 values hashing to d45f9df347eb37037587423516558cc5

query I rowsort label-5200-3
SELECT * FROM view_3_tab1_650
----
66 values hashing to d45f9df347eb37037587423516558cc5

query I rowsort label-5200-3
SELECT pk FROM tab1 WHERE col0 <= 807 AND col0 > 131
----
66 values hashing to d45f9df347eb37037587423516558cc5

statement ok
DROP VIEW view_1_tab1_650

statement ok
DROP VIEW view_2_tab1_650

statement ok
DROP VIEW view_3_tab1_650

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_650') DROP VIEW view_1_tab2_650

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_650

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_650') DROP VIEW view_2_tab2_650

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_650

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_650') DROP VIEW view_3_tab2_650

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_650

statement ok
CREATE VIEW view_1_tab2_650 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 807 AND col0 > 131

statement ok
CREATE VIEW view_2_tab2_650 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 807 AND col0 > 131)

statement ok
CREATE VIEW view_3_tab2_650 AS SELECT pk FROM view_1_tab2_650

query II rowsort label-5200-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 807 AND col0 > 131
----
132 values hashing to cd24ba442275dda23019c0892150ef5c

query II rowsort label-5200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 807 AND col0 > 131)
----
68 values hashing to 61499eefd042b724a58dbd6812d22594

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab2_650
----
132 values hashing to cd24ba442275dda23019c0892150ef5c

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab2_650
----
68 values hashing to 61499eefd042b724a58dbd6812d22594

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 807 AND col0 > 131 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 807 AND col0 > 131)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_650 UNION ALL SELECT pk, col0 FROM view_2_tab2_650
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 807 AND col0 > 131 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 807 AND col0 > 131)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_650 UNION SELECT pk, col0 FROM view_2_tab2_650
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 807 AND col0 > 131 ) AS tab2_650
----
66 values hashing to d45f9df347eb37037587423516558cc5

query I rowsort label-5200-3
SELECT * FROM view_3_tab2_650
----
66 values hashing to d45f9df347eb37037587423516558cc5

query I rowsort label-5200-3
SELECT pk FROM tab2 WHERE col0 <= 807 AND col0 > 131
----
66 values hashing to d45f9df347eb37037587423516558cc5

statement ok
DROP VIEW view_1_tab2_650

statement ok
DROP VIEW view_2_tab2_650

statement ok
DROP VIEW view_3_tab2_650

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_650') DROP VIEW view_1_tab3_650

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_650

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_650') DROP VIEW view_2_tab3_650

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_650

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_650') DROP VIEW view_3_tab3_650

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_650

statement ok
CREATE VIEW view_1_tab3_650 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 807 AND col0 > 131

statement ok
CREATE VIEW view_2_tab3_650 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 807 AND col0 > 131)

statement ok
CREATE VIEW view_3_tab3_650 AS SELECT pk FROM view_1_tab3_650

query II rowsort label-5200-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 807 AND col0 > 131
----
132 values hashing to cd24ba442275dda23019c0892150ef5c

query II rowsort label-5200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 807 AND col0 > 131)
----
68 values hashing to 61499eefd042b724a58dbd6812d22594

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab3_650
----
132 values hashing to cd24ba442275dda23019c0892150ef5c

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab3_650
----
68 values hashing to 61499eefd042b724a58dbd6812d22594

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 807 AND col0 > 131 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 807 AND col0 > 131)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_650 UNION ALL SELECT pk, col0 FROM view_2_tab3_650
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 807 AND col0 > 131 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 807 AND col0 > 131)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_650 UNION SELECT pk, col0 FROM view_2_tab3_650
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 807 AND col0 > 131 ) AS tab3_650
----
66 values hashing to d45f9df347eb37037587423516558cc5

query I rowsort label-5200-3
SELECT * FROM view_3_tab3_650
----
66 values hashing to d45f9df347eb37037587423516558cc5

query I rowsort label-5200-3
SELECT pk FROM tab3 WHERE col0 <= 807 AND col0 > 131
----
66 values hashing to d45f9df347eb37037587423516558cc5

statement ok
DROP VIEW view_1_tab3_650

statement ok
DROP VIEW view_2_tab3_650

statement ok
DROP VIEW view_3_tab3_650

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_650') DROP VIEW view_1_tab4_650

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_650

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_650') DROP VIEW view_2_tab4_650

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_650

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_650') DROP VIEW view_3_tab4_650

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_650

statement ok
CREATE VIEW view_1_tab4_650 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 807 AND col0 > 131

statement ok
CREATE VIEW view_2_tab4_650 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 807 AND col0 > 131)

statement ok
CREATE VIEW view_3_tab4_650 AS SELECT pk FROM view_1_tab4_650

query II rowsort label-5200-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 807 AND col0 > 131
----
132 values hashing to cd24ba442275dda23019c0892150ef5c

query II rowsort label-5200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 807 AND col0 > 131)
----
68 values hashing to 61499eefd042b724a58dbd6812d22594

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab4_650
----
132 values hashing to cd24ba442275dda23019c0892150ef5c

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab4_650
----
68 values hashing to 61499eefd042b724a58dbd6812d22594

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 807 AND col0 > 131 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 807 AND col0 > 131)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_650 UNION ALL SELECT pk, col0 FROM view_2_tab4_650
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 807 AND col0 > 131 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 807 AND col0 > 131)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_650 UNION SELECT pk, col0 FROM view_2_tab4_650
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 807 AND col0 > 131 ) AS tab4_650
----
66 values hashing to d45f9df347eb37037587423516558cc5

query I rowsort label-5200-3
SELECT * FROM view_3_tab4_650
----
66 values hashing to d45f9df347eb37037587423516558cc5

query I rowsort label-5200-3
SELECT pk FROM tab4 WHERE col0 <= 807 AND col0 > 131
----
66 values hashing to d45f9df347eb37037587423516558cc5

statement ok
DROP VIEW view_1_tab4_650

statement ok
DROP VIEW view_2_tab4_650

statement ok
DROP VIEW view_3_tab4_650

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_651') DROP VIEW view_1_tab0_651

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_651

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_651') DROP VIEW view_2_tab0_651

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_651

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_651') DROP VIEW view_3_tab0_651

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_651

statement ok
CREATE VIEW view_1_tab0_651 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 245)

statement ok
CREATE VIEW view_2_tab0_651 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 245))

statement ok
CREATE VIEW view_3_tab0_651 AS SELECT pk FROM view_1_tab0_651

query II rowsort label-5300-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 245)
----
54 values hashing to 9d9fb53abc76bd2f3d5841d29d9f858a

query II rowsort label-5300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 245))
----
146 values hashing to 7e5cbf4c03d404330d20d25d94b1e8a1

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab0_651
----
54 values hashing to 9d9fb53abc76bd2f3d5841d29d9f858a

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab0_651
----
146 values hashing to 7e5cbf4c03d404330d20d25d94b1e8a1

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 245) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 245))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_651 UNION ALL SELECT pk, col0 FROM view_2_tab0_651
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 245) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 245))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_651 UNION SELECT pk, col0 FROM view_2_tab0_651
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 245) ) AS tab0_651
----
27 values hashing to bedaee6a3732f1adb58c96676f9977e9

query I rowsort label-5300-3
SELECT * FROM view_3_tab0_651
----
27 values hashing to bedaee6a3732f1adb58c96676f9977e9

query I rowsort label-5300-3
SELECT pk FROM tab0 WHERE (col0 < 245)
----
27 values hashing to bedaee6a3732f1adb58c96676f9977e9

statement ok
DROP VIEW view_1_tab0_651

statement ok
DROP VIEW view_2_tab0_651

statement ok
DROP VIEW view_3_tab0_651

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_651') DROP VIEW view_1_tab1_651

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_651

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_651') DROP VIEW view_2_tab1_651

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_651

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_651') DROP VIEW view_3_tab1_651

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_651

statement ok
CREATE VIEW view_1_tab1_651 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 245)

statement ok
CREATE VIEW view_2_tab1_651 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 245))

statement ok
CREATE VIEW view_3_tab1_651 AS SELECT pk FROM view_1_tab1_651

query II rowsort label-5300-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 245)
----
54 values hashing to 9d9fb53abc76bd2f3d5841d29d9f858a

query II rowsort label-5300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 245))
----
146 values hashing to 7e5cbf4c03d404330d20d25d94b1e8a1

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab1_651
----
54 values hashing to 9d9fb53abc76bd2f3d5841d29d9f858a

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab1_651
----
146 values hashing to 7e5cbf4c03d404330d20d25d94b1e8a1

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 245) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 245))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_651 UNION ALL SELECT pk, col0 FROM view_2_tab1_651
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 245) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 245))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_651 UNION SELECT pk, col0 FROM view_2_tab1_651
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 245) ) AS tab1_651
----
27 values hashing to bedaee6a3732f1adb58c96676f9977e9

query I rowsort label-5300-3
SELECT * FROM view_3_tab1_651
----
27 values hashing to bedaee6a3732f1adb58c96676f9977e9

query I rowsort label-5300-3
SELECT pk FROM tab1 WHERE (col0 < 245)
----
27 values hashing to bedaee6a3732f1adb58c96676f9977e9

statement ok
DROP VIEW view_1_tab1_651

statement ok
DROP VIEW view_2_tab1_651

statement ok
DROP VIEW view_3_tab1_651

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_651') DROP VIEW view_1_tab2_651

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_651

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_651') DROP VIEW view_2_tab2_651

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_651

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_651') DROP VIEW view_3_tab2_651

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_651

statement ok
CREATE VIEW view_1_tab2_651 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 245)

statement ok
CREATE VIEW view_2_tab2_651 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 245))

statement ok
CREATE VIEW view_3_tab2_651 AS SELECT pk FROM view_1_tab2_651

query II rowsort label-5300-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 245)
----
54 values hashing to 9d9fb53abc76bd2f3d5841d29d9f858a

query II rowsort label-5300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 245))
----
146 values hashing to 7e5cbf4c03d404330d20d25d94b1e8a1

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab2_651
----
54 values hashing to 9d9fb53abc76bd2f3d5841d29d9f858a

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab2_651
----
146 values hashing to 7e5cbf4c03d404330d20d25d94b1e8a1

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 245) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 245))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_651 UNION ALL SELECT pk, col0 FROM view_2_tab2_651
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 245) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 245))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_651 UNION SELECT pk, col0 FROM view_2_tab2_651
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 245) ) AS tab2_651
----
27 values hashing to bedaee6a3732f1adb58c96676f9977e9

query I rowsort label-5300-3
SELECT * FROM view_3_tab2_651
----
27 values hashing to bedaee6a3732f1adb58c96676f9977e9

query I rowsort label-5300-3
SELECT pk FROM tab2 WHERE (col0 < 245)
----
27 values hashing to bedaee6a3732f1adb58c96676f9977e9

statement ok
DROP VIEW view_1_tab2_651

statement ok
DROP VIEW view_2_tab2_651

statement ok
DROP VIEW view_3_tab2_651

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_651') DROP VIEW view_1_tab3_651

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_651

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_651') DROP VIEW view_2_tab3_651

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_651

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_651') DROP VIEW view_3_tab3_651

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_651

statement ok
CREATE VIEW view_1_tab3_651 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 245)

statement ok
CREATE VIEW view_2_tab3_651 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 245))

statement ok
CREATE VIEW view_3_tab3_651 AS SELECT pk FROM view_1_tab3_651

query II rowsort label-5300-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 245)
----
54 values hashing to 9d9fb53abc76bd2f3d5841d29d9f858a

query II rowsort label-5300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 245))
----
146 values hashing to 7e5cbf4c03d404330d20d25d94b1e8a1

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab3_651
----
54 values hashing to 9d9fb53abc76bd2f3d5841d29d9f858a

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab3_651
----
146 values hashing to 7e5cbf4c03d404330d20d25d94b1e8a1

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 245) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 245))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_651 UNION ALL SELECT pk, col0 FROM view_2_tab3_651
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 245) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 245))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_651 UNION SELECT pk, col0 FROM view_2_tab3_651
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 245) ) AS tab3_651
----
27 values hashing to bedaee6a3732f1adb58c96676f9977e9

query I rowsort label-5300-3
SELECT * FROM view_3_tab3_651
----
27 values hashing to bedaee6a3732f1adb58c96676f9977e9

query I rowsort label-5300-3
SELECT pk FROM tab3 WHERE (col0 < 245)
----
27 values hashing to bedaee6a3732f1adb58c96676f9977e9

statement ok
DROP VIEW view_1_tab3_651

statement ok
DROP VIEW view_2_tab3_651

statement ok
DROP VIEW view_3_tab3_651

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_651') DROP VIEW view_1_tab4_651

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_651

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_651') DROP VIEW view_2_tab4_651

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_651

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_651') DROP VIEW view_3_tab4_651

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_651

statement ok
CREATE VIEW view_1_tab4_651 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 245)

statement ok
CREATE VIEW view_2_tab4_651 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 245))

statement ok
CREATE VIEW view_3_tab4_651 AS SELECT pk FROM view_1_tab4_651

query II rowsort label-5300-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 245)
----
54 values hashing to 9d9fb53abc76bd2f3d5841d29d9f858a

query II rowsort label-5300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 245))
----
146 values hashing to 7e5cbf4c03d404330d20d25d94b1e8a1

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab4_651
----
54 values hashing to 9d9fb53abc76bd2f3d5841d29d9f858a

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab4_651
----
146 values hashing to 7e5cbf4c03d404330d20d25d94b1e8a1

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 245) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 245))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_651 UNION ALL SELECT pk, col0 FROM view_2_tab4_651
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 245) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 245))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_651 UNION SELECT pk, col0 FROM view_2_tab4_651
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 245) ) AS tab4_651
----
27 values hashing to bedaee6a3732f1adb58c96676f9977e9

query I rowsort label-5300-3
SELECT * FROM view_3_tab4_651
----
27 values hashing to bedaee6a3732f1adb58c96676f9977e9

query I rowsort label-5300-3
SELECT pk FROM tab4 WHERE (col0 < 245)
----
27 values hashing to bedaee6a3732f1adb58c96676f9977e9

statement ok
DROP VIEW view_1_tab4_651

statement ok
DROP VIEW view_2_tab4_651

statement ok
DROP VIEW view_3_tab4_651

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_652') DROP VIEW view_1_tab0_652

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_652

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_652') DROP VIEW view_2_tab0_652

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_652

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_652') DROP VIEW view_3_tab0_652

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_652

statement ok
CREATE VIEW view_1_tab0_652 AS SELECT pk, col0 FROM tab0 WHERE (((col1 IN (102.83,510.38,216.62))))

statement ok
CREATE VIEW view_2_tab0_652 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))

statement ok
CREATE VIEW view_3_tab0_652 AS SELECT pk FROM view_1_tab0_652

query II rowsort label-5400-1
SELECT pk, col0 FROM tab0 WHERE (((col1 IN (102.83,510.38,216.62))))
----

query II rowsort label-5400-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab0_652
----

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab0_652
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col1 IN (102.83,510.38,216.62)))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_652 UNION ALL SELECT pk, col0 FROM view_2_tab0_652
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col1 IN (102.83,510.38,216.62)))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_652 UNION SELECT pk, col0 FROM view_2_tab0_652
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col1 IN (102.83,510.38,216.62)))) ) AS tab0_652
----

query I rowsort label-5400-3
SELECT * FROM view_3_tab0_652
----

query I rowsort label-5400-3
SELECT pk FROM tab0 WHERE (((col1 IN (102.83,510.38,216.62))))
----

statement ok
DROP VIEW view_1_tab0_652

statement ok
DROP VIEW view_2_tab0_652

statement ok
DROP VIEW view_3_tab0_652

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_652') DROP VIEW view_1_tab1_652

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_652

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_652') DROP VIEW view_2_tab1_652

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_652

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_652') DROP VIEW view_3_tab1_652

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_652

statement ok
CREATE VIEW view_1_tab1_652 AS SELECT pk, col0 FROM tab1 WHERE (((col1 IN (102.83,510.38,216.62))))

statement ok
CREATE VIEW view_2_tab1_652 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))

statement ok
CREATE VIEW view_3_tab1_652 AS SELECT pk FROM view_1_tab1_652

query II rowsort label-5400-1
SELECT pk, col0 FROM tab1 WHERE (((col1 IN (102.83,510.38,216.62))))
----

query II rowsort label-5400-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab1_652
----

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab1_652
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col1 IN (102.83,510.38,216.62)))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_652 UNION ALL SELECT pk, col0 FROM view_2_tab1_652
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col1 IN (102.83,510.38,216.62)))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_652 UNION SELECT pk, col0 FROM view_2_tab1_652
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col1 IN (102.83,510.38,216.62)))) ) AS tab1_652
----

query I rowsort label-5400-3
SELECT * FROM view_3_tab1_652
----

query I rowsort label-5400-3
SELECT pk FROM tab1 WHERE (((col1 IN (102.83,510.38,216.62))))
----

statement ok
DROP VIEW view_1_tab1_652

statement ok
DROP VIEW view_2_tab1_652

statement ok
DROP VIEW view_3_tab1_652

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_652') DROP VIEW view_1_tab2_652

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_652

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_652') DROP VIEW view_2_tab2_652

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_652

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_652') DROP VIEW view_3_tab2_652

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_652

statement ok
CREATE VIEW view_1_tab2_652 AS SELECT pk, col0 FROM tab2 WHERE (((col1 IN (102.83,510.38,216.62))))

statement ok
CREATE VIEW view_2_tab2_652 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))

statement ok
CREATE VIEW view_3_tab2_652 AS SELECT pk FROM view_1_tab2_652

query II rowsort label-5400-1
SELECT pk, col0 FROM tab2 WHERE (((col1 IN (102.83,510.38,216.62))))
----

query II rowsort label-5400-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab2_652
----

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab2_652
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col1 IN (102.83,510.38,216.62)))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_652 UNION ALL SELECT pk, col0 FROM view_2_tab2_652
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col1 IN (102.83,510.38,216.62)))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_652 UNION SELECT pk, col0 FROM view_2_tab2_652
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col1 IN (102.83,510.38,216.62)))) ) AS tab2_652
----

query I rowsort label-5400-3
SELECT * FROM view_3_tab2_652
----

query I rowsort label-5400-3
SELECT pk FROM tab2 WHERE (((col1 IN (102.83,510.38,216.62))))
----

statement ok
DROP VIEW view_1_tab2_652

statement ok
DROP VIEW view_2_tab2_652

statement ok
DROP VIEW view_3_tab2_652

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_652') DROP VIEW view_1_tab3_652

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_652

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_652') DROP VIEW view_2_tab3_652

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_652

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_652') DROP VIEW view_3_tab3_652

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_652

statement ok
CREATE VIEW view_1_tab3_652 AS SELECT pk, col0 FROM tab3 WHERE (((col1 IN (102.83,510.38,216.62))))

statement ok
CREATE VIEW view_2_tab3_652 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))

statement ok
CREATE VIEW view_3_tab3_652 AS SELECT pk FROM view_1_tab3_652

query II rowsort label-5400-1
SELECT pk, col0 FROM tab3 WHERE (((col1 IN (102.83,510.38,216.62))))
----

query II rowsort label-5400-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab3_652
----

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab3_652
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col1 IN (102.83,510.38,216.62)))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_652 UNION ALL SELECT pk, col0 FROM view_2_tab3_652
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col1 IN (102.83,510.38,216.62)))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_652 UNION SELECT pk, col0 FROM view_2_tab3_652
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col1 IN (102.83,510.38,216.62)))) ) AS tab3_652
----

query I rowsort label-5400-3
SELECT * FROM view_3_tab3_652
----

query I rowsort label-5400-3
SELECT pk FROM tab3 WHERE (((col1 IN (102.83,510.38,216.62))))
----

statement ok
DROP VIEW view_1_tab3_652

statement ok
DROP VIEW view_2_tab3_652

statement ok
DROP VIEW view_3_tab3_652

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_652') DROP VIEW view_1_tab4_652

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_652

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_652') DROP VIEW view_2_tab4_652

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_652

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_652') DROP VIEW view_3_tab4_652

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_652

statement ok
CREATE VIEW view_1_tab4_652 AS SELECT pk, col0 FROM tab4 WHERE (((col1 IN (102.83,510.38,216.62))))

statement ok
CREATE VIEW view_2_tab4_652 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))

statement ok
CREATE VIEW view_3_tab4_652 AS SELECT pk FROM view_1_tab4_652

query II rowsort label-5400-1
SELECT pk, col0 FROM tab4 WHERE (((col1 IN (102.83,510.38,216.62))))
----

query II rowsort label-5400-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab4_652
----

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab4_652
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col1 IN (102.83,510.38,216.62)))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_652 UNION ALL SELECT pk, col0 FROM view_2_tab4_652
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col1 IN (102.83,510.38,216.62)))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col1 IN (102.83,510.38,216.62)))))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_652 UNION SELECT pk, col0 FROM view_2_tab4_652
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col1 IN (102.83,510.38,216.62)))) ) AS tab4_652
----

query I rowsort label-5400-3
SELECT * FROM view_3_tab4_652
----

query I rowsort label-5400-3
SELECT pk FROM tab4 WHERE (((col1 IN (102.83,510.38,216.62))))
----

statement ok
DROP VIEW view_1_tab4_652

statement ok
DROP VIEW view_2_tab4_652

statement ok
DROP VIEW view_3_tab4_652

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_653') DROP VIEW view_1_tab0_653

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_653

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_653') DROP VIEW view_2_tab0_653

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_653

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_653') DROP VIEW view_3_tab0_653

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_653

statement ok
CREATE VIEW view_1_tab0_653 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 576

statement ok
CREATE VIEW view_2_tab0_653 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 576)

statement ok
CREATE VIEW view_3_tab0_653 AS SELECT pk FROM view_1_tab0_653

query II rowsort label-5500-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 576
----
96 values hashing to eb9b950cf120a0f4f2b785ff0f2bddbb

query II rowsort label-5500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 576)
----
104 values hashing to c9429433e3a6b4e0479f40cba8b162b3

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab0_653
----
96 values hashing to eb9b950cf120a0f4f2b785ff0f2bddbb

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab0_653
----
104 values hashing to c9429433e3a6b4e0479f40cba8b162b3

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 576 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 576)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_653 UNION ALL SELECT pk, col0 FROM view_2_tab0_653
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 576 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 576)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_653 UNION SELECT pk, col0 FROM view_2_tab0_653
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 576 ) AS tab0_653
----
48 values hashing to fa012b0ee1da64a93a91455c2c254990

query I rowsort label-5500-3
SELECT * FROM view_3_tab0_653
----
48 values hashing to fa012b0ee1da64a93a91455c2c254990

query I rowsort label-5500-3
SELECT pk FROM tab0 WHERE col0 >= 576
----
48 values hashing to fa012b0ee1da64a93a91455c2c254990

statement ok
DROP VIEW view_1_tab0_653

statement ok
DROP VIEW view_2_tab0_653

statement ok
DROP VIEW view_3_tab0_653

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_653') DROP VIEW view_1_tab1_653

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_653

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_653') DROP VIEW view_2_tab1_653

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_653

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_653') DROP VIEW view_3_tab1_653

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_653

statement ok
CREATE VIEW view_1_tab1_653 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 576

statement ok
CREATE VIEW view_2_tab1_653 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 576)

statement ok
CREATE VIEW view_3_tab1_653 AS SELECT pk FROM view_1_tab1_653

query II rowsort label-5500-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 576
----
96 values hashing to eb9b950cf120a0f4f2b785ff0f2bddbb

query II rowsort label-5500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 576)
----
104 values hashing to c9429433e3a6b4e0479f40cba8b162b3

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab1_653
----
96 values hashing to eb9b950cf120a0f4f2b785ff0f2bddbb

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab1_653
----
104 values hashing to c9429433e3a6b4e0479f40cba8b162b3

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 576 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 576)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_653 UNION ALL SELECT pk, col0 FROM view_2_tab1_653
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 576 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 576)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_653 UNION SELECT pk, col0 FROM view_2_tab1_653
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 576 ) AS tab1_653
----
48 values hashing to fa012b0ee1da64a93a91455c2c254990

query I rowsort label-5500-3
SELECT * FROM view_3_tab1_653
----
48 values hashing to fa012b0ee1da64a93a91455c2c254990

query I rowsort label-5500-3
SELECT pk FROM tab1 WHERE col0 >= 576
----
48 values hashing to fa012b0ee1da64a93a91455c2c254990

statement ok
DROP VIEW view_1_tab1_653

statement ok
DROP VIEW view_2_tab1_653

statement ok
DROP VIEW view_3_tab1_653

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_653') DROP VIEW view_1_tab2_653

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_653

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_653') DROP VIEW view_2_tab2_653

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_653

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_653') DROP VIEW view_3_tab2_653

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_653

statement ok
CREATE VIEW view_1_tab2_653 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 576

statement ok
CREATE VIEW view_2_tab2_653 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 576)

statement ok
CREATE VIEW view_3_tab2_653 AS SELECT pk FROM view_1_tab2_653

query II rowsort label-5500-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 576
----
96 values hashing to eb9b950cf120a0f4f2b785ff0f2bddbb

query II rowsort label-5500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 576)
----
104 values hashing to c9429433e3a6b4e0479f40cba8b162b3

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab2_653
----
96 values hashing to eb9b950cf120a0f4f2b785ff0f2bddbb

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab2_653
----
104 values hashing to c9429433e3a6b4e0479f40cba8b162b3

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 576 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 576)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_653 UNION ALL SELECT pk, col0 FROM view_2_tab2_653
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 576 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 576)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_653 UNION SELECT pk, col0 FROM view_2_tab2_653
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 576 ) AS tab2_653
----
48 values hashing to fa012b0ee1da64a93a91455c2c254990

query I rowsort label-5500-3
SELECT * FROM view_3_tab2_653
----
48 values hashing to fa012b0ee1da64a93a91455c2c254990

query I rowsort label-5500-3
SELECT pk FROM tab2 WHERE col0 >= 576
----
48 values hashing to fa012b0ee1da64a93a91455c2c254990

statement ok
DROP VIEW view_1_tab2_653

statement ok
DROP VIEW view_2_tab2_653

statement ok
DROP VIEW view_3_tab2_653

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_653') DROP VIEW view_1_tab3_653

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_653

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_653') DROP VIEW view_2_tab3_653

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_653

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_653') DROP VIEW view_3_tab3_653

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_653

statement ok
CREATE VIEW view_1_tab3_653 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 576

statement ok
CREATE VIEW view_2_tab3_653 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 576)

statement ok
CREATE VIEW view_3_tab3_653 AS SELECT pk FROM view_1_tab3_653

query II rowsort label-5500-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 576
----
96 values hashing to eb9b950cf120a0f4f2b785ff0f2bddbb

query II rowsort label-5500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 576)
----
104 values hashing to c9429433e3a6b4e0479f40cba8b162b3

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab3_653
----
96 values hashing to eb9b950cf120a0f4f2b785ff0f2bddbb

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab3_653
----
104 values hashing to c9429433e3a6b4e0479f40cba8b162b3

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 576 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 576)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_653 UNION ALL SELECT pk, col0 FROM view_2_tab3_653
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 576 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 576)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_653 UNION SELECT pk, col0 FROM view_2_tab3_653
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 576 ) AS tab3_653
----
48 values hashing to fa012b0ee1da64a93a91455c2c254990

query I rowsort label-5500-3
SELECT * FROM view_3_tab3_653
----
48 values hashing to fa012b0ee1da64a93a91455c2c254990

query I rowsort label-5500-3
SELECT pk FROM tab3 WHERE col0 >= 576
----
48 values hashing to fa012b0ee1da64a93a91455c2c254990

statement ok
DROP VIEW view_1_tab3_653

statement ok
DROP VIEW view_2_tab3_653

statement ok
DROP VIEW view_3_tab3_653

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_653') DROP VIEW view_1_tab4_653

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_653

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_653') DROP VIEW view_2_tab4_653

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_653

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_653') DROP VIEW view_3_tab4_653

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_653

statement ok
CREATE VIEW view_1_tab4_653 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 576

statement ok
CREATE VIEW view_2_tab4_653 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 576)

statement ok
CREATE VIEW view_3_tab4_653 AS SELECT pk FROM view_1_tab4_653

query II rowsort label-5500-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 576
----
96 values hashing to eb9b950cf120a0f4f2b785ff0f2bddbb

query II rowsort label-5500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 576)
----
104 values hashing to c9429433e3a6b4e0479f40cba8b162b3

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab4_653
----
96 values hashing to eb9b950cf120a0f4f2b785ff0f2bddbb

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab4_653
----
104 values hashing to c9429433e3a6b4e0479f40cba8b162b3

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 576 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 576)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_653 UNION ALL SELECT pk, col0 FROM view_2_tab4_653
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 576 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 576)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_653 UNION SELECT pk, col0 FROM view_2_tab4_653
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 576 ) AS tab4_653
----
48 values hashing to fa012b0ee1da64a93a91455c2c254990

query I rowsort label-5500-3
SELECT * FROM view_3_tab4_653
----
48 values hashing to fa012b0ee1da64a93a91455c2c254990

query I rowsort label-5500-3
SELECT pk FROM tab4 WHERE col0 >= 576
----
48 values hashing to fa012b0ee1da64a93a91455c2c254990

statement ok
DROP VIEW view_1_tab4_653

statement ok
DROP VIEW view_2_tab4_653

statement ok
DROP VIEW view_3_tab4_653

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_654') DROP VIEW view_1_tab0_654

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_654

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_654') DROP VIEW view_2_tab0_654

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_654

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_654') DROP VIEW view_3_tab0_654

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_654

statement ok
CREATE VIEW view_1_tab0_654 AS SELECT pk, col0 FROM tab0 WHERE col3 < 766 OR col4 >= 95.44

statement ok
CREATE VIEW view_2_tab0_654 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 766 OR col4 >= 95.44)

statement ok
CREATE VIEW view_3_tab0_654 AS SELECT pk FROM view_1_tab0_654

query II rowsort label-5600-1
SELECT pk, col0 FROM tab0 WHERE col3 < 766 OR col4 >= 95.44
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 766 OR col4 >= 95.44)
----

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab0_654
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab0_654
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 766 OR col4 >= 95.44 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 766 OR col4 >= 95.44)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_654 UNION ALL SELECT pk, col0 FROM view_2_tab0_654
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 766 OR col4 >= 95.44 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 766 OR col4 >= 95.44)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_654 UNION SELECT pk, col0 FROM view_2_tab0_654
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 < 766 OR col4 >= 95.44 ) AS tab0_654
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-5600-3
SELECT * FROM view_3_tab0_654
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-5600-3
SELECT pk FROM tab0 WHERE col3 < 766 OR col4 >= 95.44
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

statement ok
DROP VIEW view_1_tab0_654

statement ok
DROP VIEW view_2_tab0_654

statement ok
DROP VIEW view_3_tab0_654

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_654') DROP VIEW view_1_tab1_654

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_654

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_654') DROP VIEW view_2_tab1_654

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_654

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_654') DROP VIEW view_3_tab1_654

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_654

statement ok
CREATE VIEW view_1_tab1_654 AS SELECT pk, col0 FROM tab1 WHERE col3 < 766 OR col4 >= 95.44

statement ok
CREATE VIEW view_2_tab1_654 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 766 OR col4 >= 95.44)

statement ok
CREATE VIEW view_3_tab1_654 AS SELECT pk FROM view_1_tab1_654

query II rowsort label-5600-1
SELECT pk, col0 FROM tab1 WHERE col3 < 766 OR col4 >= 95.44
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 766 OR col4 >= 95.44)
----

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab1_654
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab1_654
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 766 OR col4 >= 95.44 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 766 OR col4 >= 95.44)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_654 UNION ALL SELECT pk, col0 FROM view_2_tab1_654
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 766 OR col4 >= 95.44 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 766 OR col4 >= 95.44)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_654 UNION SELECT pk, col0 FROM view_2_tab1_654
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 < 766 OR col4 >= 95.44 ) AS tab1_654
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-5600-3
SELECT * FROM view_3_tab1_654
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-5600-3
SELECT pk FROM tab1 WHERE col3 < 766 OR col4 >= 95.44
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

statement ok
DROP VIEW view_1_tab1_654

statement ok
DROP VIEW view_2_tab1_654

statement ok
DROP VIEW view_3_tab1_654

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_654') DROP VIEW view_1_tab2_654

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_654

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_654') DROP VIEW view_2_tab2_654

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_654

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_654') DROP VIEW view_3_tab2_654

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_654

statement ok
CREATE VIEW view_1_tab2_654 AS SELECT pk, col0 FROM tab2 WHERE col3 < 766 OR col4 >= 95.44

statement ok
CREATE VIEW view_2_tab2_654 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 766 OR col4 >= 95.44)

statement ok
CREATE VIEW view_3_tab2_654 AS SELECT pk FROM view_1_tab2_654

query II rowsort label-5600-1
SELECT pk, col0 FROM tab2 WHERE col3 < 766 OR col4 >= 95.44
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 766 OR col4 >= 95.44)
----

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab2_654
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab2_654
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 766 OR col4 >= 95.44 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 766 OR col4 >= 95.44)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_654 UNION ALL SELECT pk, col0 FROM view_2_tab2_654
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 766 OR col4 >= 95.44 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 766 OR col4 >= 95.44)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_654 UNION SELECT pk, col0 FROM view_2_tab2_654
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 < 766 OR col4 >= 95.44 ) AS tab2_654
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-5600-3
SELECT * FROM view_3_tab2_654
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-5600-3
SELECT pk FROM tab2 WHERE col3 < 766 OR col4 >= 95.44
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

statement ok
DROP VIEW view_1_tab2_654

statement ok
DROP VIEW view_2_tab2_654

statement ok
DROP VIEW view_3_tab2_654

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_654') DROP VIEW view_1_tab3_654

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_654

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_654') DROP VIEW view_2_tab3_654

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_654

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_654') DROP VIEW view_3_tab3_654

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_654

statement ok
CREATE VIEW view_1_tab3_654 AS SELECT pk, col0 FROM tab3 WHERE col3 < 766 OR col4 >= 95.44

statement ok
CREATE VIEW view_2_tab3_654 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 766 OR col4 >= 95.44)

statement ok
CREATE VIEW view_3_tab3_654 AS SELECT pk FROM view_1_tab3_654

query II rowsort label-5600-1
SELECT pk, col0 FROM tab3 WHERE col3 < 766 OR col4 >= 95.44
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 766 OR col4 >= 95.44)
----

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab3_654
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab3_654
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 766 OR col4 >= 95.44 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 766 OR col4 >= 95.44)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_654 UNION ALL SELECT pk, col0 FROM view_2_tab3_654
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 766 OR col4 >= 95.44 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 766 OR col4 >= 95.44)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_654 UNION SELECT pk, col0 FROM view_2_tab3_654
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 < 766 OR col4 >= 95.44 ) AS tab3_654
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-5600-3
SELECT * FROM view_3_tab3_654
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-5600-3
SELECT pk FROM tab3 WHERE col3 < 766 OR col4 >= 95.44
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

statement ok
DROP VIEW view_1_tab3_654

statement ok
DROP VIEW view_2_tab3_654

statement ok
DROP VIEW view_3_tab3_654

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_654') DROP VIEW view_1_tab4_654

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_654

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_654') DROP VIEW view_2_tab4_654

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_654

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_654') DROP VIEW view_3_tab4_654

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_654

statement ok
CREATE VIEW view_1_tab4_654 AS SELECT pk, col0 FROM tab4 WHERE col3 < 766 OR col4 >= 95.44

statement ok
CREATE VIEW view_2_tab4_654 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 766 OR col4 >= 95.44)

statement ok
CREATE VIEW view_3_tab4_654 AS SELECT pk FROM view_1_tab4_654

query II rowsort label-5600-1
SELECT pk, col0 FROM tab4 WHERE col3 < 766 OR col4 >= 95.44
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 766 OR col4 >= 95.44)
----

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab4_654
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab4_654
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 766 OR col4 >= 95.44 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 766 OR col4 >= 95.44)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_654 UNION ALL SELECT pk, col0 FROM view_2_tab4_654
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 766 OR col4 >= 95.44 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 766 OR col4 >= 95.44)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_654 UNION SELECT pk, col0 FROM view_2_tab4_654
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 < 766 OR col4 >= 95.44 ) AS tab4_654
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-5600-3
SELECT * FROM view_3_tab4_654
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

query I rowsort label-5600-3
SELECT pk FROM tab4 WHERE col3 < 766 OR col4 >= 95.44
----
100 values hashing to d7fd31c3916c207fd3117332326c3f37

statement ok
DROP VIEW view_1_tab4_654

statement ok
DROP VIEW view_2_tab4_654

statement ok
DROP VIEW view_3_tab4_654

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_655') DROP VIEW view_1_tab0_655

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_655

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_655') DROP VIEW view_2_tab0_655

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_655

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_655') DROP VIEW view_3_tab0_655

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_655

statement ok
CREATE VIEW view_1_tab0_655 AS SELECT pk, col0 FROM tab0 WHERE col0 > 298

statement ok
CREATE VIEW view_2_tab0_655 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 298)

statement ok
CREATE VIEW view_3_tab0_655 AS SELECT pk FROM view_1_tab0_655

query II rowsort label-5700-1
SELECT pk, col0 FROM tab0 WHERE col0 > 298
----
140 values hashing to f1f9b0ad2075871b2fb0ca90eea0efb1

query II rowsort label-5700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 298)
----
60 values hashing to 5364dd9eae8d107912478306dfa37983

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab0_655
----
140 values hashing to f1f9b0ad2075871b2fb0ca90eea0efb1

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab0_655
----
60 values hashing to 5364dd9eae8d107912478306dfa37983

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 298 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 298)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_655 UNION ALL SELECT pk, col0 FROM view_2_tab0_655
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 298 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 298)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_655 UNION SELECT pk, col0 FROM view_2_tab0_655
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 298 ) AS tab0_655
----
70 values hashing to 6d270095773d8228b1aafe8e94c61df3

query I rowsort label-5700-3
SELECT * FROM view_3_tab0_655
----
70 values hashing to 6d270095773d8228b1aafe8e94c61df3

query I rowsort label-5700-3
SELECT pk FROM tab0 WHERE col0 > 298
----
70 values hashing to 6d270095773d8228b1aafe8e94c61df3

statement ok
DROP VIEW view_1_tab0_655

statement ok
DROP VIEW view_2_tab0_655

statement ok
DROP VIEW view_3_tab0_655

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_655') DROP VIEW view_1_tab1_655

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_655

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_655') DROP VIEW view_2_tab1_655

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_655

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_655') DROP VIEW view_3_tab1_655

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_655

statement ok
CREATE VIEW view_1_tab1_655 AS SELECT pk, col0 FROM tab1 WHERE col0 > 298

statement ok
CREATE VIEW view_2_tab1_655 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 298)

statement ok
CREATE VIEW view_3_tab1_655 AS SELECT pk FROM view_1_tab1_655

query II rowsort label-5700-1
SELECT pk, col0 FROM tab1 WHERE col0 > 298
----
140 values hashing to f1f9b0ad2075871b2fb0ca90eea0efb1

query II rowsort label-5700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 298)
----
60 values hashing to 5364dd9eae8d107912478306dfa37983

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab1_655
----
140 values hashing to f1f9b0ad2075871b2fb0ca90eea0efb1

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab1_655
----
60 values hashing to 5364dd9eae8d107912478306dfa37983

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 298 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 298)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_655 UNION ALL SELECT pk, col0 FROM view_2_tab1_655
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 298 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 298)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_655 UNION SELECT pk, col0 FROM view_2_tab1_655
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 298 ) AS tab1_655
----
70 values hashing to 6d270095773d8228b1aafe8e94c61df3

query I rowsort label-5700-3
SELECT * FROM view_3_tab1_655
----
70 values hashing to 6d270095773d8228b1aafe8e94c61df3

query I rowsort label-5700-3
SELECT pk FROM tab1 WHERE col0 > 298
----
70 values hashing to 6d270095773d8228b1aafe8e94c61df3

statement ok
DROP VIEW view_1_tab1_655

statement ok
DROP VIEW view_2_tab1_655

statement ok
DROP VIEW view_3_tab1_655

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_655') DROP VIEW view_1_tab2_655

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_655

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_655') DROP VIEW view_2_tab2_655

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_655

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_655') DROP VIEW view_3_tab2_655

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_655

statement ok
CREATE VIEW view_1_tab2_655 AS SELECT pk, col0 FROM tab2 WHERE col0 > 298

statement ok
CREATE VIEW view_2_tab2_655 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 298)

statement ok
CREATE VIEW view_3_tab2_655 AS SELECT pk FROM view_1_tab2_655

query II rowsort label-5700-1
SELECT pk, col0 FROM tab2 WHERE col0 > 298
----
140 values hashing to f1f9b0ad2075871b2fb0ca90eea0efb1

query II rowsort label-5700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 298)
----
60 values hashing to 5364dd9eae8d107912478306dfa37983

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab2_655
----
140 values hashing to f1f9b0ad2075871b2fb0ca90eea0efb1

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab2_655
----
60 values hashing to 5364dd9eae8d107912478306dfa37983

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 298 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 298)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_655 UNION ALL SELECT pk, col0 FROM view_2_tab2_655
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 298 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 298)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_655 UNION SELECT pk, col0 FROM view_2_tab2_655
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 298 ) AS tab2_655
----
70 values hashing to 6d270095773d8228b1aafe8e94c61df3

query I rowsort label-5700-3
SELECT * FROM view_3_tab2_655
----
70 values hashing to 6d270095773d8228b1aafe8e94c61df3

query I rowsort label-5700-3
SELECT pk FROM tab2 WHERE col0 > 298
----
70 values hashing to 6d270095773d8228b1aafe8e94c61df3

statement ok
DROP VIEW view_1_tab2_655

statement ok
DROP VIEW view_2_tab2_655

statement ok
DROP VIEW view_3_tab2_655

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_655') DROP VIEW view_1_tab3_655

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_655

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_655') DROP VIEW view_2_tab3_655

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_655

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_655') DROP VIEW view_3_tab3_655

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_655

statement ok
CREATE VIEW view_1_tab3_655 AS SELECT pk, col0 FROM tab3 WHERE col0 > 298

statement ok
CREATE VIEW view_2_tab3_655 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 298)

statement ok
CREATE VIEW view_3_tab3_655 AS SELECT pk FROM view_1_tab3_655

query II rowsort label-5700-1
SELECT pk, col0 FROM tab3 WHERE col0 > 298
----
140 values hashing to f1f9b0ad2075871b2fb0ca90eea0efb1

query II rowsort label-5700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 298)
----
60 values hashing to 5364dd9eae8d107912478306dfa37983

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab3_655
----
140 values hashing to f1f9b0ad2075871b2fb0ca90eea0efb1

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab3_655
----
60 values hashing to 5364dd9eae8d107912478306dfa37983

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 298 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 298)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_655 UNION ALL SELECT pk, col0 FROM view_2_tab3_655
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 298 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 298)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_655 UNION SELECT pk, col0 FROM view_2_tab3_655
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 298 ) AS tab3_655
----
70 values hashing to 6d270095773d8228b1aafe8e94c61df3

query I rowsort label-5700-3
SELECT * FROM view_3_tab3_655
----
70 values hashing to 6d270095773d8228b1aafe8e94c61df3

query I rowsort label-5700-3
SELECT pk FROM tab3 WHERE col0 > 298
----
70 values hashing to 6d270095773d8228b1aafe8e94c61df3

statement ok
DROP VIEW view_1_tab3_655

statement ok
DROP VIEW view_2_tab3_655

statement ok
DROP VIEW view_3_tab3_655

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_655') DROP VIEW view_1_tab4_655

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_655

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_655') DROP VIEW view_2_tab4_655

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_655

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_655') DROP VIEW view_3_tab4_655

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_655

statement ok
CREATE VIEW view_1_tab4_655 AS SELECT pk, col0 FROM tab4 WHERE col0 > 298

statement ok
CREATE VIEW view_2_tab4_655 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 298)

statement ok
CREATE VIEW view_3_tab4_655 AS SELECT pk FROM view_1_tab4_655

query II rowsort label-5700-1
SELECT pk, col0 FROM tab4 WHERE col0 > 298
----
140 values hashing to f1f9b0ad2075871b2fb0ca90eea0efb1

query II rowsort label-5700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 298)
----
60 values hashing to 5364dd9eae8d107912478306dfa37983

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab4_655
----
140 values hashing to f1f9b0ad2075871b2fb0ca90eea0efb1

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab4_655
----
60 values hashing to 5364dd9eae8d107912478306dfa37983

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 298 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 298)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_655 UNION ALL SELECT pk, col0 FROM view_2_tab4_655
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 298 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 298)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_655 UNION SELECT pk, col0 FROM view_2_tab4_655
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 298 ) AS tab4_655
----
70 values hashing to 6d270095773d8228b1aafe8e94c61df3

query I rowsort label-5700-3
SELECT * FROM view_3_tab4_655
----
70 values hashing to 6d270095773d8228b1aafe8e94c61df3

query I rowsort label-5700-3
SELECT pk FROM tab4 WHERE col0 > 298
----
70 values hashing to 6d270095773d8228b1aafe8e94c61df3

statement ok
DROP VIEW view_1_tab4_655

statement ok
DROP VIEW view_2_tab4_655

statement ok
DROP VIEW view_3_tab4_655

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_656') DROP VIEW view_1_tab0_656

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_656

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_656') DROP VIEW view_2_tab0_656

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_656

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_656') DROP VIEW view_3_tab0_656

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_656

statement ok
CREATE VIEW view_1_tab0_656 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 210

statement ok
CREATE VIEW view_2_tab0_656 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 210)

statement ok
CREATE VIEW view_3_tab0_656 AS SELECT pk FROM view_1_tab0_656

query II rowsort label-5800-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 210
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-5800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 210)
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab0_656
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab0_656
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 210 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 210)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_656 UNION ALL SELECT pk, col0 FROM view_2_tab0_656
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 210 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 210)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_656 UNION SELECT pk, col0 FROM view_2_tab0_656
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 210 ) AS tab0_656
----
72 values hashing to f65119d4d79ec4245a7873330ff2e41f

query I rowsort label-5800-3
SELECT * FROM view_3_tab0_656
----
72 values hashing to f65119d4d79ec4245a7873330ff2e41f

query I rowsort label-5800-3
SELECT pk FROM tab0 WHERE col3 >= 210
----
72 values hashing to f65119d4d79ec4245a7873330ff2e41f

statement ok
DROP VIEW view_1_tab0_656

statement ok
DROP VIEW view_2_tab0_656

statement ok
DROP VIEW view_3_tab0_656

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_656') DROP VIEW view_1_tab1_656

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_656

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_656') DROP VIEW view_2_tab1_656

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_656

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_656') DROP VIEW view_3_tab1_656

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_656

statement ok
CREATE VIEW view_1_tab1_656 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 210

statement ok
CREATE VIEW view_2_tab1_656 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 210)

statement ok
CREATE VIEW view_3_tab1_656 AS SELECT pk FROM view_1_tab1_656

query II rowsort label-5800-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 210
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-5800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 210)
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab1_656
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab1_656
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 210 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 210)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_656 UNION ALL SELECT pk, col0 FROM view_2_tab1_656
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 210 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 210)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_656 UNION SELECT pk, col0 FROM view_2_tab1_656
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 210 ) AS tab1_656
----
72 values hashing to f65119d4d79ec4245a7873330ff2e41f

query I rowsort label-5800-3
SELECT * FROM view_3_tab1_656
----
72 values hashing to f65119d4d79ec4245a7873330ff2e41f

query I rowsort label-5800-3
SELECT pk FROM tab1 WHERE col3 >= 210
----
72 values hashing to f65119d4d79ec4245a7873330ff2e41f

statement ok
DROP VIEW view_1_tab1_656

statement ok
DROP VIEW view_2_tab1_656

statement ok
DROP VIEW view_3_tab1_656

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_656') DROP VIEW view_1_tab2_656

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_656

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_656') DROP VIEW view_2_tab2_656

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_656

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_656') DROP VIEW view_3_tab2_656

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_656

statement ok
CREATE VIEW view_1_tab2_656 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 210

statement ok
CREATE VIEW view_2_tab2_656 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 210)

statement ok
CREATE VIEW view_3_tab2_656 AS SELECT pk FROM view_1_tab2_656

query II rowsort label-5800-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 210
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-5800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 210)
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab2_656
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab2_656
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 210 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 210)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_656 UNION ALL SELECT pk, col0 FROM view_2_tab2_656
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 210 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 210)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_656 UNION SELECT pk, col0 FROM view_2_tab2_656
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 210 ) AS tab2_656
----
72 values hashing to f65119d4d79ec4245a7873330ff2e41f

query I rowsort label-5800-3
SELECT * FROM view_3_tab2_656
----
72 values hashing to f65119d4d79ec4245a7873330ff2e41f

query I rowsort label-5800-3
SELECT pk FROM tab2 WHERE col3 >= 210
----
72 values hashing to f65119d4d79ec4245a7873330ff2e41f

statement ok
DROP VIEW view_1_tab2_656

statement ok
DROP VIEW view_2_tab2_656

statement ok
DROP VIEW view_3_tab2_656

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_656') DROP VIEW view_1_tab3_656

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_656

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_656') DROP VIEW view_2_tab3_656

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_656

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_656') DROP VIEW view_3_tab3_656

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_656

statement ok
CREATE VIEW view_1_tab3_656 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 210

statement ok
CREATE VIEW view_2_tab3_656 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 210)

statement ok
CREATE VIEW view_3_tab3_656 AS SELECT pk FROM view_1_tab3_656

query II rowsort label-5800-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 210
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-5800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 210)
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab3_656
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab3_656
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 210 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 210)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_656 UNION ALL SELECT pk, col0 FROM view_2_tab3_656
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 210 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 210)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_656 UNION SELECT pk, col0 FROM view_2_tab3_656
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 210 ) AS tab3_656
----
72 values hashing to f65119d4d79ec4245a7873330ff2e41f

query I rowsort label-5800-3
SELECT * FROM view_3_tab3_656
----
72 values hashing to f65119d4d79ec4245a7873330ff2e41f

query I rowsort label-5800-3
SELECT pk FROM tab3 WHERE col3 >= 210
----
72 values hashing to f65119d4d79ec4245a7873330ff2e41f

statement ok
DROP VIEW view_1_tab3_656

statement ok
DROP VIEW view_2_tab3_656

statement ok
DROP VIEW view_3_tab3_656

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_656') DROP VIEW view_1_tab4_656

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_656

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_656') DROP VIEW view_2_tab4_656

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_656

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_656') DROP VIEW view_3_tab4_656

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_656

statement ok
CREATE VIEW view_1_tab4_656 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 210

statement ok
CREATE VIEW view_2_tab4_656 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 210)

statement ok
CREATE VIEW view_3_tab4_656 AS SELECT pk FROM view_1_tab4_656

query II rowsort label-5800-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 210
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-5800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 210)
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab4_656
----
144 values hashing to 21e3c91059eb74d70eec077144718374

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab4_656
----
56 values hashing to 11ea9b5609f685c34be3190502157912

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 210 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 210)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_656 UNION ALL SELECT pk, col0 FROM view_2_tab4_656
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 210 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 210)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_656 UNION SELECT pk, col0 FROM view_2_tab4_656
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 210 ) AS tab4_656
----
72 values hashing to f65119d4d79ec4245a7873330ff2e41f

query I rowsort label-5800-3
SELECT * FROM view_3_tab4_656
----
72 values hashing to f65119d4d79ec4245a7873330ff2e41f

query I rowsort label-5800-3
SELECT pk FROM tab4 WHERE col3 >= 210
----
72 values hashing to f65119d4d79ec4245a7873330ff2e41f

statement ok
DROP VIEW view_1_tab4_656

statement ok
DROP VIEW view_2_tab4_656

statement ok
DROP VIEW view_3_tab4_656

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_657') DROP VIEW view_1_tab0_657

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_657

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_657') DROP VIEW view_2_tab0_657

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_657

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_657') DROP VIEW view_3_tab0_657

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_657

statement ok
CREATE VIEW view_1_tab0_657 AS SELECT pk, col0 FROM tab0 WHERE col0 = 157

statement ok
CREATE VIEW view_2_tab0_657 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 157)

statement ok
CREATE VIEW view_3_tab0_657 AS SELECT pk FROM view_1_tab0_657

query II rowsort label-5900-1
SELECT pk, col0 FROM tab0 WHERE col0 = 157
----

query II rowsort label-5900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 157)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab0_657
----

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab0_657
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 157 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 157)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_657 UNION ALL SELECT pk, col0 FROM view_2_tab0_657
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 157 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 157)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_657 UNION SELECT pk, col0 FROM view_2_tab0_657
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 157 ) AS tab0_657
----

query I rowsort label-5900-3
SELECT * FROM view_3_tab0_657
----

query I rowsort label-5900-3
SELECT pk FROM tab0 WHERE col0 = 157
----

statement ok
DROP VIEW view_1_tab0_657

statement ok
DROP VIEW view_2_tab0_657

statement ok
DROP VIEW view_3_tab0_657

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_657') DROP VIEW view_1_tab1_657

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_657

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_657') DROP VIEW view_2_tab1_657

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_657

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_657') DROP VIEW view_3_tab1_657

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_657

statement ok
CREATE VIEW view_1_tab1_657 AS SELECT pk, col0 FROM tab1 WHERE col0 = 157

statement ok
CREATE VIEW view_2_tab1_657 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 157)

statement ok
CREATE VIEW view_3_tab1_657 AS SELECT pk FROM view_1_tab1_657

query II rowsort label-5900-1
SELECT pk, col0 FROM tab1 WHERE col0 = 157
----

query II rowsort label-5900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 157)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab1_657
----

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab1_657
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 157 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 157)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_657 UNION ALL SELECT pk, col0 FROM view_2_tab1_657
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 157 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 157)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_657 UNION SELECT pk, col0 FROM view_2_tab1_657
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 157 ) AS tab1_657
----

query I rowsort label-5900-3
SELECT * FROM view_3_tab1_657
----

query I rowsort label-5900-3
SELECT pk FROM tab1 WHERE col0 = 157
----

statement ok
DROP VIEW view_1_tab1_657

statement ok
DROP VIEW view_2_tab1_657

statement ok
DROP VIEW view_3_tab1_657

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_657') DROP VIEW view_1_tab2_657

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_657

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_657') DROP VIEW view_2_tab2_657

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_657

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_657') DROP VIEW view_3_tab2_657

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_657

statement ok
CREATE VIEW view_1_tab2_657 AS SELECT pk, col0 FROM tab2 WHERE col0 = 157

statement ok
CREATE VIEW view_2_tab2_657 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 157)

statement ok
CREATE VIEW view_3_tab2_657 AS SELECT pk FROM view_1_tab2_657

query II rowsort label-5900-1
SELECT pk, col0 FROM tab2 WHERE col0 = 157
----

query II rowsort label-5900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 157)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab2_657
----

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab2_657
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 157 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 157)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_657 UNION ALL SELECT pk, col0 FROM view_2_tab2_657
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 157 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 157)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_657 UNION SELECT pk, col0 FROM view_2_tab2_657
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 157 ) AS tab2_657
----

query I rowsort label-5900-3
SELECT * FROM view_3_tab2_657
----

query I rowsort label-5900-3
SELECT pk FROM tab2 WHERE col0 = 157
----

statement ok
DROP VIEW view_1_tab2_657

statement ok
DROP VIEW view_2_tab2_657

statement ok
DROP VIEW view_3_tab2_657

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_657') DROP VIEW view_1_tab3_657

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_657

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_657') DROP VIEW view_2_tab3_657

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_657

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_657') DROP VIEW view_3_tab3_657

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_657

statement ok
CREATE VIEW view_1_tab3_657 AS SELECT pk, col0 FROM tab3 WHERE col0 = 157

statement ok
CREATE VIEW view_2_tab3_657 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 157)

statement ok
CREATE VIEW view_3_tab3_657 AS SELECT pk FROM view_1_tab3_657

query II rowsort label-5900-1
SELECT pk, col0 FROM tab3 WHERE col0 = 157
----

query II rowsort label-5900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 157)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab3_657
----

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab3_657
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 157 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 157)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_657 UNION ALL SELECT pk, col0 FROM view_2_tab3_657
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 157 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 157)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_657 UNION SELECT pk, col0 FROM view_2_tab3_657
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 157 ) AS tab3_657
----

query I rowsort label-5900-3
SELECT * FROM view_3_tab3_657
----

query I rowsort label-5900-3
SELECT pk FROM tab3 WHERE col0 = 157
----

statement ok
DROP VIEW view_1_tab3_657

statement ok
DROP VIEW view_2_tab3_657

statement ok
DROP VIEW view_3_tab3_657

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_657') DROP VIEW view_1_tab4_657

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_657

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_657') DROP VIEW view_2_tab4_657

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_657

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_657') DROP VIEW view_3_tab4_657

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_657

statement ok
CREATE VIEW view_1_tab4_657 AS SELECT pk, col0 FROM tab4 WHERE col0 = 157

statement ok
CREATE VIEW view_2_tab4_657 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 157)

statement ok
CREATE VIEW view_3_tab4_657 AS SELECT pk FROM view_1_tab4_657

query II rowsort label-5900-1
SELECT pk, col0 FROM tab4 WHERE col0 = 157
----

query II rowsort label-5900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 157)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab4_657
----

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab4_657
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 157 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 157)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_657 UNION ALL SELECT pk, col0 FROM view_2_tab4_657
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 157 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 157)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_657 UNION SELECT pk, col0 FROM view_2_tab4_657
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 157 ) AS tab4_657
----

query I rowsort label-5900-3
SELECT * FROM view_3_tab4_657
----

query I rowsort label-5900-3
SELECT pk FROM tab4 WHERE col0 = 157
----

statement ok
DROP VIEW view_1_tab4_657

statement ok
DROP VIEW view_2_tab4_657

statement ok
DROP VIEW view_3_tab4_657

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_658') DROP VIEW view_1_tab0_658

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_658

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_658') DROP VIEW view_2_tab0_658

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_658

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_658') DROP VIEW view_3_tab0_658

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_658

statement ok
CREATE VIEW view_1_tab0_658 AS SELECT pk, col0 FROM tab0 WHERE col3 > 930

statement ok
CREATE VIEW view_2_tab0_658 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 930)

statement ok
CREATE VIEW view_3_tab0_658 AS SELECT pk FROM view_1_tab0_658

query II rowsort label-6000-1
SELECT pk, col0 FROM tab0 WHERE col3 > 930
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-6000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 930)
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab0_658
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab0_658
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 930 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 930)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_658 UNION ALL SELECT pk, col0 FROM view_2_tab0_658
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 930 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 930)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_658 UNION SELECT pk, col0 FROM view_2_tab0_658
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 930 ) AS tab0_658
----
15
27
50
55
63
82

query I rowsort label-6000-3
SELECT * FROM view_3_tab0_658
----
15
27
50
55
63
82

query I rowsort label-6000-3
SELECT pk FROM tab0 WHERE col3 > 930
----
15
27
50
55
63
82

statement ok
DROP VIEW view_1_tab0_658

statement ok
DROP VIEW view_2_tab0_658

statement ok
DROP VIEW view_3_tab0_658

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_658') DROP VIEW view_1_tab1_658

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_658

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_658') DROP VIEW view_2_tab1_658

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_658

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_658') DROP VIEW view_3_tab1_658

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_658

statement ok
CREATE VIEW view_1_tab1_658 AS SELECT pk, col0 FROM tab1 WHERE col3 > 930

statement ok
CREATE VIEW view_2_tab1_658 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 930)

statement ok
CREATE VIEW view_3_tab1_658 AS SELECT pk FROM view_1_tab1_658

query II rowsort label-6000-1
SELECT pk, col0 FROM tab1 WHERE col3 > 930
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-6000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 930)
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab1_658
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab1_658
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 930 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 930)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_658 UNION ALL SELECT pk, col0 FROM view_2_tab1_658
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 930 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 930)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_658 UNION SELECT pk, col0 FROM view_2_tab1_658
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 930 ) AS tab1_658
----
15
27
50
55
63
82

query I rowsort label-6000-3
SELECT * FROM view_3_tab1_658
----
15
27
50
55
63
82

query I rowsort label-6000-3
SELECT pk FROM tab1 WHERE col3 > 930
----
15
27
50
55
63
82

statement ok
DROP VIEW view_1_tab1_658

statement ok
DROP VIEW view_2_tab1_658

statement ok
DROP VIEW view_3_tab1_658

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_658') DROP VIEW view_1_tab2_658

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_658

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_658') DROP VIEW view_2_tab2_658

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_658

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_658') DROP VIEW view_3_tab2_658

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_658

statement ok
CREATE VIEW view_1_tab2_658 AS SELECT pk, col0 FROM tab2 WHERE col3 > 930

statement ok
CREATE VIEW view_2_tab2_658 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 930)

statement ok
CREATE VIEW view_3_tab2_658 AS SELECT pk FROM view_1_tab2_658

query II rowsort label-6000-1
SELECT pk, col0 FROM tab2 WHERE col3 > 930
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-6000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 930)
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab2_658
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab2_658
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 930 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 930)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_658 UNION ALL SELECT pk, col0 FROM view_2_tab2_658
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 930 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 930)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_658 UNION SELECT pk, col0 FROM view_2_tab2_658
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 930 ) AS tab2_658
----
15
27
50
55
63
82

query I rowsort label-6000-3
SELECT * FROM view_3_tab2_658
----
15
27
50
55
63
82

query I rowsort label-6000-3
SELECT pk FROM tab2 WHERE col3 > 930
----
15
27
50
55
63
82

statement ok
DROP VIEW view_1_tab2_658

statement ok
DROP VIEW view_2_tab2_658

statement ok
DROP VIEW view_3_tab2_658

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_658') DROP VIEW view_1_tab3_658

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_658

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_658') DROP VIEW view_2_tab3_658

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_658

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_658') DROP VIEW view_3_tab3_658

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_658

statement ok
CREATE VIEW view_1_tab3_658 AS SELECT pk, col0 FROM tab3 WHERE col3 > 930

statement ok
CREATE VIEW view_2_tab3_658 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 930)

statement ok
CREATE VIEW view_3_tab3_658 AS SELECT pk FROM view_1_tab3_658

query II rowsort label-6000-1
SELECT pk, col0 FROM tab3 WHERE col3 > 930
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-6000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 930)
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab3_658
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab3_658
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 930 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 930)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_658 UNION ALL SELECT pk, col0 FROM view_2_tab3_658
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 930 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 930)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_658 UNION SELECT pk, col0 FROM view_2_tab3_658
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 930 ) AS tab3_658
----
15
27
50
55
63
82

query I rowsort label-6000-3
SELECT * FROM view_3_tab3_658
----
15
27
50
55
63
82

query I rowsort label-6000-3
SELECT pk FROM tab3 WHERE col3 > 930
----
15
27
50
55
63
82

statement ok
DROP VIEW view_1_tab3_658

statement ok
DROP VIEW view_2_tab3_658

statement ok
DROP VIEW view_3_tab3_658

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_658') DROP VIEW view_1_tab4_658

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_658

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_658') DROP VIEW view_2_tab4_658

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_658

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_658') DROP VIEW view_3_tab4_658

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_658

statement ok
CREATE VIEW view_1_tab4_658 AS SELECT pk, col0 FROM tab4 WHERE col3 > 930

statement ok
CREATE VIEW view_2_tab4_658 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 930)

statement ok
CREATE VIEW view_3_tab4_658 AS SELECT pk FROM view_1_tab4_658

query II rowsort label-6000-1
SELECT pk, col0 FROM tab4 WHERE col3 > 930
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-6000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 930)
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab4_658
----
12 values hashing to 3657486d891c6c9b81d2cc6f8c30384e

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab4_658
----
188 values hashing to bccf057438220acee89e0a11499b5af1

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 930 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 930)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_658 UNION ALL SELECT pk, col0 FROM view_2_tab4_658
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 930 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 930)
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_658 UNION SELECT pk, col0 FROM view_2_tab4_658
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 930 ) AS tab4_658
----
15
27
50
55
63
82

query I rowsort label-6000-3
SELECT * FROM view_3_tab4_658
----
15
27
50
55
63
82

query I rowsort label-6000-3
SELECT pk FROM tab4 WHERE col3 > 930
----
15
27
50
55
63
82

statement ok
DROP VIEW view_1_tab4_658

statement ok
DROP VIEW view_2_tab4_658

statement ok
DROP VIEW view_3_tab4_658

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_659') DROP VIEW view_1_tab0_659

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_659

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_659') DROP VIEW view_2_tab0_659

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_659

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_659') DROP VIEW view_3_tab0_659

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_659

statement ok
CREATE VIEW view_1_tab0_659 AS SELECT pk, col0 FROM tab0 WHERE ((col0 >= 575))

statement ok
CREATE VIEW view_2_tab0_659 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 >= 575)))

statement ok
CREATE VIEW view_3_tab0_659 AS SELECT pk FROM view_1_tab0_659

query II rowsort label-6100-1
SELECT pk, col0 FROM tab0 WHERE ((col0 >= 575))
----
98 values hashing to 30538ad90ce9acf3c4bea1621f535ec4

query II rowsort label-6100-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 >= 575)))
----
102 values hashing to 97f167bb613875191537789d647b53eb

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab0_659
----
98 values hashing to 30538ad90ce9acf3c4bea1621f535ec4

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab0_659
----
102 values hashing to 97f167bb613875191537789d647b53eb

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 >= 575)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 >= 575)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_659 UNION ALL SELECT pk, col0 FROM view_2_tab0_659
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 >= 575)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 >= 575)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_659 UNION SELECT pk, col0 FROM view_2_tab0_659
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 >= 575)) ) AS tab0_659
----
49 values hashing to ccb6d190efd8c9d5e521ae496417a451

query I rowsort label-6100-3
SELECT * FROM view_3_tab0_659
----
49 values hashing to ccb6d190efd8c9d5e521ae496417a451

query I rowsort label-6100-3
SELECT pk FROM tab0 WHERE ((col0 >= 575))
----
49 values hashing to ccb6d190efd8c9d5e521ae496417a451

statement ok
DROP VIEW view_1_tab0_659

statement ok
DROP VIEW view_2_tab0_659

statement ok
DROP VIEW view_3_tab0_659

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_659') DROP VIEW view_1_tab1_659

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_659

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_659') DROP VIEW view_2_tab1_659

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_659

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_659') DROP VIEW view_3_tab1_659

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_659

statement ok
CREATE VIEW view_1_tab1_659 AS SELECT pk, col0 FROM tab1 WHERE ((col0 >= 575))

statement ok
CREATE VIEW view_2_tab1_659 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 >= 575)))

statement ok
CREATE VIEW view_3_tab1_659 AS SELECT pk FROM view_1_tab1_659

query II rowsort label-6100-1
SELECT pk, col0 FROM tab1 WHERE ((col0 >= 575))
----
98 values hashing to 30538ad90ce9acf3c4bea1621f535ec4

query II rowsort label-6100-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 >= 575)))
----
102 values hashing to 97f167bb613875191537789d647b53eb

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab1_659
----
98 values hashing to 30538ad90ce9acf3c4bea1621f535ec4

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab1_659
----
102 values hashing to 97f167bb613875191537789d647b53eb

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 >= 575)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 >= 575)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_659 UNION ALL SELECT pk, col0 FROM view_2_tab1_659
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 >= 575)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 >= 575)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_659 UNION SELECT pk, col0 FROM view_2_tab1_659
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 >= 575)) ) AS tab1_659
----
49 values hashing to ccb6d190efd8c9d5e521ae496417a451

query I rowsort label-6100-3
SELECT * FROM view_3_tab1_659
----
49 values hashing to ccb6d190efd8c9d5e521ae496417a451

query I rowsort label-6100-3
SELECT pk FROM tab1 WHERE ((col0 >= 575))
----
49 values hashing to ccb6d190efd8c9d5e521ae496417a451

statement ok
DROP VIEW view_1_tab1_659

statement ok
DROP VIEW view_2_tab1_659

statement ok
DROP VIEW view_3_tab1_659

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_659') DROP VIEW view_1_tab2_659

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_659

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_659') DROP VIEW view_2_tab2_659

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_659

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_659') DROP VIEW view_3_tab2_659

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_659

statement ok
CREATE VIEW view_1_tab2_659 AS SELECT pk, col0 FROM tab2 WHERE ((col0 >= 575))

statement ok
CREATE VIEW view_2_tab2_659 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 >= 575)))

statement ok
CREATE VIEW view_3_tab2_659 AS SELECT pk FROM view_1_tab2_659

query II rowsort label-6100-1
SELECT pk, col0 FROM tab2 WHERE ((col0 >= 575))
----
98 values hashing to 30538ad90ce9acf3c4bea1621f535ec4

query II rowsort label-6100-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 >= 575)))
----
102 values hashing to 97f167bb613875191537789d647b53eb

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab2_659
----
98 values hashing to 30538ad90ce9acf3c4bea1621f535ec4

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab2_659
----
102 values hashing to 97f167bb613875191537789d647b53eb

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 >= 575)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 >= 575)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_659 UNION ALL SELECT pk, col0 FROM view_2_tab2_659
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 >= 575)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 >= 575)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_659 UNION SELECT pk, col0 FROM view_2_tab2_659
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 >= 575)) ) AS tab2_659
----
49 values hashing to ccb6d190efd8c9d5e521ae496417a451

query I rowsort label-6100-3
SELECT * FROM view_3_tab2_659
----
49 values hashing to ccb6d190efd8c9d5e521ae496417a451

query I rowsort label-6100-3
SELECT pk FROM tab2 WHERE ((col0 >= 575))
----
49 values hashing to ccb6d190efd8c9d5e521ae496417a451

statement ok
DROP VIEW view_1_tab2_659

statement ok
DROP VIEW view_2_tab2_659

statement ok
DROP VIEW view_3_tab2_659

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_659') DROP VIEW view_1_tab3_659

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_659

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_659') DROP VIEW view_2_tab3_659

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_659

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_659') DROP VIEW view_3_tab3_659

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_659

statement ok
CREATE VIEW view_1_tab3_659 AS SELECT pk, col0 FROM tab3 WHERE ((col0 >= 575))

statement ok
CREATE VIEW view_2_tab3_659 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 >= 575)))

statement ok
CREATE VIEW view_3_tab3_659 AS SELECT pk FROM view_1_tab3_659

query II rowsort label-6100-1
SELECT pk, col0 FROM tab3 WHERE ((col0 >= 575))
----
98 values hashing to 30538ad90ce9acf3c4bea1621f535ec4

query II rowsort label-6100-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 >= 575)))
----
102 values hashing to 97f167bb613875191537789d647b53eb

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab3_659
----
98 values hashing to 30538ad90ce9acf3c4bea1621f535ec4

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab3_659
----
102 values hashing to 97f167bb613875191537789d647b53eb

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 >= 575)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 >= 575)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_659 UNION ALL SELECT pk, col0 FROM view_2_tab3_659
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 >= 575)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 >= 575)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_659 UNION SELECT pk, col0 FROM view_2_tab3_659
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 >= 575)) ) AS tab3_659
----
49 values hashing to ccb6d190efd8c9d5e521ae496417a451

query I rowsort label-6100-3
SELECT * FROM view_3_tab3_659
----
49 values hashing to ccb6d190efd8c9d5e521ae496417a451

query I rowsort label-6100-3
SELECT pk FROM tab3 WHERE ((col0 >= 575))
----
49 values hashing to ccb6d190efd8c9d5e521ae496417a451

statement ok
DROP VIEW view_1_tab3_659

statement ok
DROP VIEW view_2_tab3_659

statement ok
DROP VIEW view_3_tab3_659

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_659') DROP VIEW view_1_tab4_659

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_659

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_659') DROP VIEW view_2_tab4_659

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_659

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_659') DROP VIEW view_3_tab4_659

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_659

statement ok
CREATE VIEW view_1_tab4_659 AS SELECT pk, col0 FROM tab4 WHERE ((col0 >= 575))

statement ok
CREATE VIEW view_2_tab4_659 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 >= 575)))

statement ok
CREATE VIEW view_3_tab4_659 AS SELECT pk FROM view_1_tab4_659

query II rowsort label-6100-1
SELECT pk, col0 FROM tab4 WHERE ((col0 >= 575))
----
98 values hashing to 30538ad90ce9acf3c4bea1621f535ec4

query II rowsort label-6100-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 >= 575)))
----
102 values hashing to 97f167bb613875191537789d647b53eb

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab4_659
----
98 values hashing to 30538ad90ce9acf3c4bea1621f535ec4

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab4_659
----
102 values hashing to 97f167bb613875191537789d647b53eb

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 >= 575)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 >= 575)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_659 UNION ALL SELECT pk, col0 FROM view_2_tab4_659
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 >= 575)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 >= 575)))
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_659 UNION SELECT pk, col0 FROM view_2_tab4_659
----
200 values hashing to ee9d23c216f4de232614e0a99cb5b461

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 >= 575)) ) AS tab4_659
----
49 values hashing to ccb6d190efd8c9d5e521ae496417a451

query I rowsort label-6100-3
SELECT * FROM view_3_tab4_659
----
49 values hashing to ccb6d190efd8c9d5e521ae496417a451

query I rowsort label-6100-3
SELECT pk FROM tab4 WHERE ((col0 >= 575))
----
49 values hashing to ccb6d190efd8c9d5e521ae496417a451

statement ok
DROP VIEW view_1_tab4_659

statement ok
DROP VIEW view_2_tab4_659

statement ok
DROP VIEW view_3_tab4_659

