## Summary
<!--Explain briefly what goes wrong and explain why you believe this is a bug and not the intended behavior of SQLite (if it is not a crash).-->**No review yet**

## Minimized query

```sql
.vfsinfo
PRAGMA full_column_names = OFF;
PRAGMA stats;
CREATE TABLE T (
  a TEXT,
  b REAL
);
INSERT INTO T VALUES ('' || ('') || ('a'),json_object()), ('b',-((typeof(hex('')) + json_remove(-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, '$')) + 200.5)), ('c',9e999);
SELECT a,b,
LEAD(b,1) OVER (ORDER BY b DESC) AS c,
NTILE(2) OVER (ORDER BY b DESC) AS d FROM T;
.clone new_db
PRAGMA wal_autocheckpoint;
BEGIN TRANSACTION;
.exit
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT NOT (b < ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE +c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) WITH _m AS MATERIALIZED (SELECT * FROM t2) SELECT * FROM cte CROSS JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM _m WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE +c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;

SELECT GROUP_CONCAT(x, '.') OVER (ORDER BY x RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM t2;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t3_6949 ON t3(c2) WHERE c2 IS NOT NULL;
END;
INSERT INTO t1 VALUES ('x', 1, 1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
BEGIN TRANSACTION;
.exit
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;

SELECT GROUP_CONCAT(x, '.') OVER (ORDER BY x RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM t2;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t3_6949 ON t3(c2) WHERE c2 IS NOT NULL;
END;
INSERT INTO t1 VALUES ('x', 1, 1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
BEGIN TRANSACTION;
.exit
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y  NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;

SELECT GROUP_CONCAT(x, '.') OVER (ORDER BY x RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM t2;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t3_6949 ON t3(c2) WHERE c2 IS NOT NULL;
END;
INSERT INTO t1 VALUES ('x', 1, 1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
BEGIN TRANSACTION;
.exit
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;

SELECT GROUP_CONCAT(x, '.') OVER (ORDER BY x RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM t2;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t3_6949 ON t3(c2) WHERE c2 IS NOT NULL;
END;
INSERT INTO t1 VALUES ('x', 1, 1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
BEGIN TRANSACTION;
.exit
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1  ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;

SELECT GROUP_CONCAT(x, '.') OVER (ORDER BY x RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM t2;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t3_6949 ON t3(c2) WHERE c2 IS NOT NULL;
END;
INSERT INTO t1 VALUES ('x', 1, 1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
BEGIN TRANSACTION;
.exit
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;

SELECT GROUP_CONCAT(x, '.') OVER (ORDER BY x RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM t2;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t3_6949 ON t3(c2) WHERE c2 IS NOT NULL;
END;
INSERT INTO t1 VALUES ('x', 1, 1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
BEGIN TRANSACTION;
.exit
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, /**/ c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;

SELECT GROUP_CONCAT(x, '.') OVER (ORDER BY x RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM t2;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t3_6949 ON t3(c2) WHERE c2 IS NOT NULL;
END;
INSERT INTO t1 VALUES ('x', 1, 1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
BEGIN TRANSACTION;
.exit
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;

SELECT GROUP_CONCAT(x, '.') OVER (ORDER BY x RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM t2;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t3_6949 ON t3(c2) WHERE c2 IS NOT NULL;
END;
INSERT INTO t1 VALUES ('x', 1, 1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
BEGIN TRANSACTION;
.exit
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;

SELECT GROUP_CONCAT(x, '.') OVER (ORDER BY x RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM t2;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t3_6949 ON t3(c2) WHERE c2 IS NOT NULL;
END;
INSERT INTO t1 VALUES ('x', 1, 1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
BEGIN TRANSACTION;
.exit
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION /* likelihood(1, 0.5) */ BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;
ATTACH DATABASE ':memory:' AS aux31;
CREATE TABLE t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x INTEGER PRIMARY KEY, y);
CREATE TABLE t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT NOT (b = ?) ;
SELECT DISTINCT c FROM t1 WHERE b IN (CAST(1 AS INT),2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

SELECT SUM(c1) FILTER (WHERE c1 > 0) OVER (PARTITION BY c1 ORDER BY c1 ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t3;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte LEFT JOIN t4 ON cte.a = t4.a;
DETACH DATABASE aux31;
ALTER TABLE t3 ADD COLUMN extra_6544 DOUB DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t2 WHERE y NOT IN (SELECT y FROM t2 WHERE y IS NULL);
SELECT * FROM t3;
VACUUM main;

SELECT GROUP_CONCAT(x, '.') OVER (ORDER BY x RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM t2;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t3_6949 ON t3(c2) WHERE c2 IS NOT NULL;
END;
INSERT INTO t1 VALUES ('x', 1, 1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;

SELECT * FROM t3 CROSS JOIN t1;
SELECT GROUP_CONCAT(c) FROM t1;
VACUUM;
CREATE TABLE T (
  a TEXT,
  b INTEGER,
  c REAL
);
INSERT INTO T VALUES ('a',1,2.0), ('a',2,-3.0), ('b',1,4.5);
SELECT a,b,c,
SUM(c) OVER (
  PARTITION BY a
  ORDER BY b
) AS d
FROM T;
WITH cte AS (SELECT * FROM t1) SELECT * FROM cte WHERE d > 0 UNION ALL SELECT * FROM cte WHERE d <= 0;
VACUUM main;
DROP TABLE IF EXISTS t1;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_6663 ON T(lower(a)) WHERE a IS NOT NULL;
INSERT INTO t4 VALUES (1, 'x', 'x', 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
SELECT * FROM t3 AS a LEFT JOIN t4 AS b ON a.rowid = b.rowid;
ALTER TABLE t1 DROP COLUMN d;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t4_4263 ON t4(a) WHERE a > 0;
SELECT GROUP_CONCAT(a, '.') OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t1;
SELECT RANK() OVER (ORDER BY c ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM T;
INSERT OR FAIL INTO T VALUES (0, 'x', 0);
WITH cte AS (SELECT "123" AS x) SELECT x + 0 FROM cte;

SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM T;
CREATE TABLE T (
  a INTEGER,
  b REAL,
  c REAL
);
INSERT INTO T VALUES (1,2.0,10.5), (1,-3.5,20.25), (2,9e999,-1.0);
WITH d AS (SELECT a,SUM(b*c) AS e FROM T GROUP BY a) SELECT * FROM d;
VACUUM main;
ALTER TABLE t4 ADD COLUMN extra_4372 CHARINT DEFAULT (abs(random()) % 1000);
DELETE FROM t4 WHERE rowid = 48;
ALTER TABLE t4 DROP COLUMN d;
ANALYZE;
ANALYZE t4;
UPDATE t3 SET c2 = '' WHERE 1;
ANALYZE;
INSERT INTO t3 DEFAULT VALUES;
SELECT COUNT(*) FILTER (WHERE c IS NOT NULL), SUM(rowid) FILTER (WHERE c > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(c) FILTER (WHERE c > 0 AND c < 100), COUNT(*) FILTER (WHERE typeof(c) = "text") FROM t1;
VACUUM;
SELECT COUNT(*) OVER (ORDER BY y) FROM t2;
WITH cte AS (SELECT d, COUNT(*) FROM t4 GROUP BY d) SELECT * FROM cte;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_6048 AS SELECT a FROM T;
CREATE TABLE T (
  A VARCHAR(20),
  B VARCHAR(10),
  PRIMARY KEY (A, B)
);
INSERT INTO T VALUES ('a', 'p');
INSERT INTO T VALUES ('a', 'q');
INSERT INTO T VALUES ('b', 'q');
INSERT INTO T VALUES ('c', 'r');
INSERT INTO T VALUES ('b', 'r');
INSERT INTO T VALUES ('b', 't');
SELECT B, COUNT(DISTINCT A) AS D FROM T GROUP BY B ORDER BY D DESC, B ASC;
INSERT INTO t3 VALUES (1, 1) ON CONFLICT(c1) DO UPDATE SET c1 = excluded.c1, c2 = excluded.c2;
DROP INDEX IF EXISTS T;
ALTER TABLE t4 RENAME COLUMN b TO b_r5662;
INSERT INTO t1 SELECT * FROM t1;
CREATE  VIEW IF NOT EXISTS v_T_284 AS SELECT B FROM T;
CREATE  VIEW IF NOT EXISTS v_t2_4282 AS SELECT x FROM t2;
SELECT COUNT(*) FILTER (WHERE c1 IS NOT NULL), SUM(rowid) FILTER (WHERE c1 > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(c1) FILTER (WHERE c1 > 0 AND c1 < 100), COUNT(*) FILTER (WHERE typeof(c1) = "text") FROM t3;
WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<0) SELECT * FROM cnt;
SELECT * FROM t2 AS a LEFT JOIN t4 AS b ON a.rowid = b.rowid;
CREATE  INDEX IF NOT EXISTS idx_t1_2223 ON t1(lower(a));
PRAGMA parser_trace = 0;
CREATE TABLE T (
  a INTEGER,
  b REAL
);
INSERT INTO T VALUES (1,1.5), (2,-2.5), (3,0.0);
CREATE INDEX c
ON T(b);
SELECT * FROM T WHERE b >= -2.5 AND b < 2.0;
SELECT * FROM t2 AS a FULL JOIN t2 AS b ON a.rowid = b.rowid;
WITH RECURSIVE multi(a, b) AS (VALUES(1, "x") UNION ALL SELECT a+1, "x" FROM multi WHERE a<88) SELECT * FROM multi;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',0.0);
SELECT * FROM T WHERE c < 2.0 ORDER BY c;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t3_5974 AS SELECT c1 FROM t3;
SELECT * FROM t1;
INSERT INTO t2 VALUES ('x', NULL) ON CONFLICT(x) DO UPDATE SET x = excluded.x, y = excluded.y;
SELECT * FROM (SELECT * FROM t3) AS sub;
ALTER TABLE t3 DROP COLUMN c2;
ANALYZE;
VACUUM;
SELECT AVG(d) FROM t4;
SELECT * FROM t4 CROSS JOIN t4;
ALTER TABLE t2 ADD COLUMN extra_6496 DATE UNIQUE;
INSERT INTO t1 VALUES ('x', 'x', 1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
ANALYZE;
DELETE FROM T WHERE c > (SELECT AVG(c) FROM T) RETURNING *;
```

## Actual output

```sql
1000
```

## Expectation

```sql

```

## Flag

```

```

