## 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
PRAGMA short_column_names = OFF;
ATTACH DATABASE ':memory:' AS aux69;
PRAGMA vdbe_debug = OFF;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (1, 'Wernher', 10, 100);
INSERT INTO t1 VALUES (2, 'von', 20, 200);
INSERT INTO t1 VALUES (3, 'Braun', 30, 300);

CREATE INDEX t1bc ON t1(b, c);

PRAGMA writable_schema = ON;

.imposter t1bc t2

SELECT * FROM t2;

SELECT b, c FROM t1 ORDER BY b, c;

.quit
ATTACH DATABASE ':memory:' AS aux50;
PRAGMA trusted_schema = NO;
CREATE TABLE T1 (
  a NUMERIC,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (jsonb_object(),CAST(log(CAST(printf('%f', timediff(trim('hello', NULL), -(-(1.0)))) AS VARCHAR(255))) AS TINYINT) ->> '$');
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
PRAGMA vdbe_trace = OFF;
PRAGMA writable_schema = TRUE;
CREATE TEMPORARY TABLE [t0](x, y, z);
SELECT -quote(NULL);
SELECT * FROM sqlite_temp_master WHERE NOT NOT (NOT sql GLOB '000[]***') ;
DROP TABLE t0;
CREATE TABLE T (
  a TEXT,
  b TEXT
);
INSERT INTO T VALUES ('a','2020-01-01'), ('b','2026-01-01');
SELECT a,
CAST(
  (julianday('now')-julianday(b))/power(if(NULL, char(log2(sign(-'}'))), NULL), typeof(randomblob(NULL)))
  AS INTEGER
) AS c
FROM T;
.restore emplyeee.db
.quit
.mode
CREATE TABLE "t1"(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(NULL, '$[#]', zeroblob(if(NULL, x'2c4e11', ((-'{' + CAST(0 AS TINYINT)) + 0.0))))) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
WITH _m AS MATERIALIZED (SELECT * FROM t3) SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO _m VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
WITH _m AS MATERIALIZED (SELECT * FROM t2) SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v__m_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TABLE T1 (
  A VARCHAR(20),
  X VARCHAR(10),
  PRIMARY KEY (A, X)
);
CREATE TABLE T2 (
  A VARCHAR(20),
  Y VARCHAR(10),
  PRIMARY KEY (A, Y)
);
INSERT INTO T1 VALUES ('a', 'm');
INSERT INTO T1 VALUES ('b', 'n');
INSERT INTO T1 VALUES ('c', 'o');
INSERT INTO T2 VALUES ('b', 'k');
SELECT A FROM T1 EXCEPT SELECT A FROM T2;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
VACUUM main;
INSERT INTO t1 VALUES (NULL, NULL, NULL);
SELECT COUNT(*) FILTER (WHERE A IS NOT NULL), SUM(rowid) FILTER (WHERE A > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(A) FILTER (WHERE A > 0 AND A < 100), COUNT(*) FILTER (WHERE typeof(A) = "text") FROM T1;
ALTER TABLE T2 ADD COLUMN extra_5851 BIGINT UNIQUE;
CREATE TABLE T (
  A VARCHAR(20),
  B VARCHAR(30),
  C VARCHAR(30),
  PRIMARY KEY (A, B),
  UNIQUE (A, C)
);
INSERT INTO T VALUES ('a', 'p', 'x');
INSERT INTO T VALUES ('a', 'q', 'y');
INSERT INTO T VALUES ('b', 'p', 'z');
INSERT INTO T VALUES ('c', 'r', 'w');
INSERT INTO T VALUES ('d', 's', 'v');
SELECT A, COUNT(DISTINCT B) AS D FROM T GROUP BY A HAVING COUNT(DISTINCT B) >= 1;
INSERT INTO T1 DEFAULT VALUES;
ALTER TABLE t1 DROP COLUMN b;
SELECT * FROM T1;
DROP INDEX IF EXISTS t1;
INSERT INTO T1 DEFAULT VALUES;
ANALYZE T1;
SELECT COUNT(*) FILTER (WHERE A IS NOT NULL), SUM(rowid) FILTER (WHERE A > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(A) FILTER (WHERE A > 0 AND A < 100), COUNT(*) FILTER (WHERE typeof(A) = "text") FROM T2;
ALTER TABLE t2 RENAME TO t2_r5486;
REINDEX T1;
ALTER TABLE T RENAME COLUMN B TO B_r934;
SELECT MAX(C) FROM T;
DROP TRIGGER IF EXISTS T1;
SELECT * FROM T WHERE EXISTS (SELECT 1 FROM T WHERE B = NULL);
INSERT INTO t3 VALUES (NULL);
DELETE FROM t1 WHERE b > (SELECT AVG(b) FROM t1) RETURNING *;
WITH cte AS (SELECT A, COUNT(*) AS cnt FROM T2 GROUP BY A) SELECT * FROM cte WHERE cnt > 1;
INSERT INTO T2 VALUES (NULL, NULL);
CREATE TABLE T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15),
  C BIGINT NOT NULL,
  UNIQUE (B, C)
);
INSERT INTO T VALUES ('a', 'p', 3000);
INSERT INTO T VALUES ('b', 'q', 9223372036854775807);
INSERT INTO T VALUES ('c', 'r', 1700);
INSERT INTO T VALUES ('e', 'q', -9223372036854775808);
INSERT INTO T VALUES ('f', 'r', 0);
SELECT B, COUNT(*) AS D, SUM(C) AS E, AVG(C) AS F FROM T GROUP BY B HAVING SUM(C) > 0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T2_6904 ON T2(Y) WHERE Y > 0;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t2_3173 AS SELECT y FROM t2;
REINDEX;
DELETE FROM t2 WHERE y IS NULL RETURNING *;
ALTER TABLE T1 ADD COLUMN extra_1526 DATETIME DEFAULT 0;
SELECT * FROM T2 AS a JOIN t2 AS b ON a.rowid = b.rowid;
ALTER TABLE T2 DROP COLUMN A;
CREATE TRIGGER IF NOT EXISTS trg_t2_1087 AFTER DELETE ON t2 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM T2 WHERE NOT EXISTS (SELECT 1 FROM T2 WHERE 1 = 0);
ALTER TABLE T2 RENAME COLUMN Y TO Y_r7222;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t2_8398 AS SELECT y FROM t2;
CREATE TRIGGER IF NOT EXISTS trg_t3_8421 AFTER UPDATE ON t3 FOR EACH ROW BEGIN SELECT RAISE(IGNORE); END;
WITH RECURSIVE tree(id, path) AS (VALUES(1, "/1") UNION ALL SELECT id+1, path || "/" || (id+1) FROM tree WHERE id<52) SELECT * FROM tree;
DELETE FROM t1 WHERE 0;
INSERT INTO t2 DEFAULT VALUES;
SELECT LAG(y, 1, NULL) OVER (ORDER BY y RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
SELECT AVG(y) FILTER (WHERE y != 0) OVER (ORDER BY y ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t2;
ALTER TABLE T ADD COLUMN extra_2647 CLOB DEFAULT (random());
SELECT MAX(A) FILTER (WHERE A IS NOT NULL) OVER (PARTITION BY A ORDER BY A GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T2;
CREATE  VIEW IF NOT EXISTS v_t2_1422 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE B IS NOT NULL), SUM(rowid) FILTER (WHERE B > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(B) FILTER (WHERE B > 0 AND B < 100), COUNT(*) FILTER (WHERE typeof(B) = "text") FROM T;
PRAGMA trusted_schema = NO;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (jsonb_object(),1.0 ->> '$');
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
PRAGMA vdbe_trace = OFF;
PRAGMA writable_schema = TRUE;
CREATE TEMPORARY TABLE t0(x, y, z);
SELECT -quote(NULL);
SELECT * FROM sqlite_temp_master WHERE NOT NOT (NOT sql GLOB '000[]***') ;
DROP TABLE t0;
CREATE TABLE T (
  a TEXT,
  b TEXT
);
INSERT INTO T VALUES ('a','2020-01-01'), ('b','2026-01-01');
SELECT a,
CAST(
  (julianday('now')-julianday(b))/power(if(NULL, char(log2(sign(-'}'))), NULL), typeof(randomblob(NULL)))
  AS INTEGER
) AS c
FROM T;
.restore emplyeee.db
.quit
.mode
CREATE TABLE "t1"(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(NULL, '$[#]', zeroblob(if(NULL, x'2c4e11', ((-'{' + CAST(0 AS TINYINT)) + 0.0))))) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
WITH _m AS MATERIALIZED (SELECT * FROM t2) SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v__m_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TABLE T1 (
  A VARCHAR(20),
  X VARCHAR(10),
  PRIMARY KEY (A, X)
);
CREATE TABLE T2 (
  A VARCHAR(20),
  Y VARCHAR(10),
  PRIMARY KEY (A, Y)
);
INSERT INTO T1 VALUES ('a', 'm');
INSERT INTO T1 VALUES ('b', 'n');
INSERT INTO T1 VALUES ('c', 'o');
INSERT INTO T2 VALUES ('b', 'k');
SELECT A FROM T1 EXCEPT SELECT A FROM T2;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
VACUUM main;
INSERT INTO t1 VALUES (NULL, NULL, NULL);
SELECT COUNT(*) FILTER (WHERE A IS NOT NULL), SUM(rowid) FILTER (WHERE A > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(A) FILTER (WHERE A > 0 AND A < 100), COUNT(*) FILTER (WHERE typeof(A) = "text") FROM T1;
ALTER TABLE T2 ADD COLUMN extra_5851 BIGINT UNIQUE;
CREATE TABLE T (
  A VARCHAR(20),
  B VARCHAR(30),
  C VARCHAR(30),
  PRIMARY KEY (A, B),
  UNIQUE (A, C)
);
INSERT INTO T VALUES ('a', 'p', 'x');
INSERT INTO T VALUES ('a', 'q', 'y');
INSERT INTO T VALUES ('b', 'p', 'z');
INSERT INTO T VALUES ('c', 'r', 'w');
INSERT INTO T VALUES ('d', 's', 'v');
SELECT A, COUNT(DISTINCT B) AS D FROM T GROUP BY A HAVING COUNT(DISTINCT B) >= 1;
INSERT INTO T1 DEFAULT VALUES;
ALTER TABLE t1 DROP COLUMN b;
SELECT * FROM T1;
DROP INDEX IF EXISTS t1;
INSERT INTO T1 DEFAULT VALUES;
ANALYZE T1;
SELECT COUNT(*) FILTER (WHERE A IS NOT NULL), SUM(rowid) FILTER (WHERE A > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(A) FILTER (WHERE A > 0 AND A < 100), COUNT(*) FILTER (WHERE typeof(A) = "text") FROM T2;
ALTER TABLE t2 RENAME TO t2_r5486;
REINDEX T1;
ALTER TABLE T RENAME COLUMN B TO B_r934;
SELECT MAX(C) FROM T;
DROP TRIGGER IF EXISTS T1;
SELECT * FROM T WHERE EXISTS (SELECT 1 FROM T WHERE B = NULL);
INSERT INTO t3 VALUES (NULL);
DELETE FROM t1 WHERE b > (SELECT AVG(b) FROM t1) RETURNING *;
WITH cte AS (SELECT A, COUNT(*) AS cnt FROM T2 GROUP BY A) SELECT * FROM cte WHERE cnt > 1;
INSERT INTO T2 VALUES (NULL, NULL);
CREATE TABLE T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15),
  C BIGINT NOT NULL,
  UNIQUE (B, C)
);
INSERT INTO T VALUES ('a', 'p', 3000);
INSERT INTO T VALUES ('b', 'q', 9223372036854775807);
INSERT INTO T VALUES ('c', 'r', 1700);
INSERT INTO T VALUES ('e', 'q', -9223372036854775808);
INSERT INTO T VALUES ('f', 'r', 0);
SELECT B, COUNT(*) AS D, SUM(C) AS E, AVG(C) AS F FROM T GROUP BY B HAVING SUM(C) > 0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T2_6904 ON T2(Y) WHERE Y > 0;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t2_3173 AS SELECT y FROM t2;
REINDEX;
DELETE FROM t2 WHERE y IS NULL RETURNING *;
ALTER TABLE T1 ADD COLUMN extra_1526 DATETIME DEFAULT 0;
SELECT * FROM T2 AS a JOIN t2 AS b ON a.rowid = b.rowid;
ALTER TABLE T2 DROP COLUMN A;
CREATE TRIGGER IF NOT EXISTS trg_t2_1087 AFTER DELETE ON t2 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM T2 WHERE NOT EXISTS (SELECT 1 FROM T2 WHERE 1 = 0);
ALTER TABLE T2 RENAME COLUMN Y TO Y_r7222;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t2_8398 AS SELECT y FROM t2;
CREATE TRIGGER IF NOT EXISTS trg_t3_8421 AFTER UPDATE ON t3 FOR EACH ROW BEGIN SELECT RAISE(IGNORE); END;
WITH RECURSIVE tree(id, path) AS (VALUES(1, "/1") UNION ALL SELECT id+1, path || "/" || (id+1) FROM tree WHERE id<52) SELECT * FROM tree;
DELETE FROM t1 WHERE 0;
INSERT INTO t2 DEFAULT VALUES;
SELECT LAG(y, 1, NULL) OVER (ORDER BY y RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
SELECT AVG(y) FILTER (WHERE y != 0) OVER (ORDER BY y ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t2;
ALTER TABLE T ADD COLUMN extra_2647 CLOB DEFAULT (random());
SELECT MAX(A) FILTER (WHERE A IS NOT NULL) OVER (PARTITION BY A ORDER BY A GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T2;
CREATE  VIEW IF NOT EXISTS v_t2_1422 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE B IS NOT NULL), SUM(rowid) FILTER (WHERE B > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(B) FILTER (WHERE B > 0 AND B < 100), COUNT(*) FILTER (WHERE typeof(B) = "text") FROM T;
PRAGMA trusted_schema = NO;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (jsonb_object(),1.0 ->> '$');
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
PRAGMA vdbe_trace = OFF;
PRAGMA writable_schema = TRUE;
CREATE TEMPORARY TABLE t0(x, y, z);
SELECT -quote(NULL);
SELECT * FROM sqlite_temp_master WHERE NOT NOT (NOT sql GLOB '000[]***') ;
DROP TABLE t0;
CREATE TABLE T (
  a TEXT,
  b TEXT
);
INSERT INTO T VALUES ('a','2020-01-01'), ('b','2026-01-01');
SELECT a,
CAST(
  (julianday('now')-julianday(b))/power(if(NULL, char(log2(sign(-'}'))), NULL), typeof(randomblob(NULL)))
  AS INTEGER
) AS c
FROM T;
.restore emplyeee.db
.quit
.mode
CREATE TABLE "t1"(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(NULL, '$[#]', zeroblob(if(NULL, x'2c4e11', ((-'{' + CAST(0 AS TINYINT)) + 0.0))))) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
WITH _m AS MATERIALIZED (SELECT * FROM t2) SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v__m_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TABLE T1 (
  A VARCHAR(20),
  X VARCHAR(10),
  PRIMARY KEY (A, X)
);
CREATE TABLE T2 (
  A VARCHAR(20),
  Y VARCHAR(10),
  PRIMARY KEY (A, Y)
);
INSERT INTO T1 VALUES ('a', 'm');
INSERT INTO T1 VALUES ('b', 'n');
INSERT INTO T1 VALUES ('c', 'o');
INSERT INTO T2 VALUES ('b', 'k');
SELECT A FROM T1 EXCEPT SELECT A FROM T2;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
VACUUM main;
INSERT INTO t1 VALUES (NULL, NULL, NULL);
SELECT COUNT(*) FILTER (WHERE A IS NOT NULL), SUM(rowid) FILTER (WHERE A > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(A) FILTER (WHERE A > 0 AND A < 100), COUNT(*) FILTER (WHERE typeof(A) = "text") FROM T1;
ALTER TABLE T2 ADD COLUMN extra_5851 BIGINT UNIQUE;
CREATE TABLE T (
  A VARCHAR(20),
  B VARCHAR(30),
  C VARCHAR(30),
  PRIMARY KEY (A, B),
  UNIQUE (A, C)
);
INSERT INTO T VALUES ('a', 'p', 'x');
INSERT INTO T VALUES ('a', 'q', 'y');
INSERT INTO T VALUES ('b', 'p', 'z');
INSERT INTO T VALUES ('c', 'r', 'w');
INSERT INTO T VALUES ('d', 's', 'v');
SELECT A, COUNT(DISTINCT B) AS D FROM T GROUP BY A HAVING COUNT(DISTINCT B) >= 1;
INSERT INTO T1 DEFAULT VALUES;
ALTER TABLE t1 DROP COLUMN b;
SELECT * FROM T1;
DROP INDEX IF EXISTS t1;
INSERT INTO T1 DEFAULT VALUES;
ANALYZE T1;
SELECT COUNT(*) FILTER (WHERE A IS NOT NULL), SUM(rowid) FILTER (WHERE A > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(A) FILTER (WHERE A > 0 AND A < 100), COUNT(*) FILTER (WHERE typeof(A) = "text") FROM T2;
ALTER TABLE t2 RENAME TO t2_r5486;
REINDEX T1;
ALTER TABLE T RENAME COLUMN B TO B_r934;
SELECT MAX(C) FROM T;
DROP TRIGGER IF EXISTS T1;
SELECT * FROM T WHERE EXISTS (SELECT 1 FROM T WHERE B = NULL);
INSERT INTO t3 VALUES (NULL);
DELETE FROM t1 WHERE b > (SELECT AVG(b) FROM t1) RETURNING *;
WITH cte AS (SELECT A, COUNT(*) AS cnt FROM T2 GROUP BY A) SELECT * FROM cte WHERE cnt > 1;
INSERT INTO T2 VALUES (NULL, NULL);
CREATE TABLE T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15),
  C BIGINT NOT NULL,
  UNIQUE (B, C)
);
INSERT INTO T VALUES ('a', 'p', 3000);
INSERT INTO T VALUES ('b', 'q', 9223372036854775807);
INSERT INTO T VALUES ('c', 'r', 1700);
INSERT INTO T VALUES ('e', 'q', -9223372036854775808);
INSERT INTO T VALUES ('f', 'r', 0);
SELECT B, COUNT(*) AS D, SUM(C) AS E, AVG(C) AS F FROM T GROUP BY B HAVING SUM(C) > 0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T2_6904 ON T2(Y) WHERE Y > 0;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t2_3173 AS SELECT y FROM t2;
REINDEX;
DELETE FROM t2 WHERE y IS NULL RETURNING *;
ALTER TABLE T1 ADD COLUMN extra_1526 DATETIME DEFAULT 0;
SELECT * FROM T2 AS a JOIN t2 AS b ON a.rowid = b.rowid;
ALTER TABLE T2 DROP COLUMN A;
CREATE TRIGGER IF NOT EXISTS trg_t2_1087 AFTER DELETE ON t2 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM T2 WHERE NOT EXISTS (SELECT 1 FROM T2 WHERE 1 = 0);
ALTER TABLE T2 RENAME COLUMN Y TO Y_r7222;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t2_8398 AS SELECT y FROM t2;
CREATE TRIGGER IF NOT EXISTS trg_t3_8421 AFTER UPDATE ON t3 FOR EACH ROW BEGIN SELECT RAISE(IGNORE); END;
WITH RECURSIVE tree(id, path) AS (VALUES(1, "/1") UNION ALL SELECT id+1, path || "/" || (id+1) FROM tree WHERE id<52) SELECT * FROM tree;
DELETE FROM t1 WHERE 0;
INSERT INTO t2 DEFAULT VALUES;
SELECT LAG(y, 1, NULL) OVER (ORDER BY y RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
SELECT AVG(y) FILTER (WHERE y != 0) OVER (ORDER BY y ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t2;
ALTER TABLE T ADD COLUMN extra_2647 CLOB DEFAULT (random());
SELECT MAX(A) FILTER (WHERE A IS NOT NULL) OVER (PARTITION BY A ORDER BY A GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T2;
CREATE  VIEW IF NOT EXISTS v_t2_1422 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE B IS NOT NULL), SUM(rowid) FILTER (WHERE B > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(B) FILTER (WHERE B > 0 AND B < 100), COUNT(*) FILTER (WHERE typeof(B) = "text") FROM T;
PRAGMA trusted_schema = NO;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (jsonb_object(),1.0 ->> '$');
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
PRAGMA vdbe_trace = OFF;
PRAGMA writable_schema = TRUE;
CREATE TEMPORARY TABLE t0(x, y, z);
SELECT -quote(NULL);
SELECT * FROM sqlite_temp_master WHERE NOT NOT (NOT sql GLOB '000[]***') ;
DROP TABLE t0;
CREATE TABLE T (
  a TEXT,
  b TEXT
);
INSERT INTO T VALUES ('a','2020-01-01'), ('b','2026-01-01');
SELECT a,
CAST(
  (julianday('now')-julianday(b))/power(if(NULL, char(log2(sign(-'}'))), NULL), typeof(randomblob(NULL)))
  AS INTEGER
) AS c
FROM T;
.restore emplyeee.db
.quit
.mode
CREATE TABLE "t1"(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(NULL, '$[#]', zeroblob(if(NULL, x'2c4e11', ((-'{' + CAST(0 AS TINYINT)) + 0.0))))) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
WITH _m AS MATERIALIZED (SELECT * FROM t2) SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v__m_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TABLE T1 (
  A VARCHAR(20),
  X VARCHAR(10),
  PRIMARY KEY (A, X)
);
CREATE TABLE T2 (
  A VARCHAR(20),
  Y VARCHAR(10),
  PRIMARY KEY (A, Y)
);
INSERT INTO T1 VALUES ('a', 'm');
INSERT INTO T1 VALUES ('b', 'n');
INSERT INTO T1 VALUES ('c', 'o');
INSERT INTO T2 VALUES ('b', 'k');
SELECT A FROM T1 EXCEPT SELECT A FROM T2;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE T1 (
  A VARCHAR(20),
  X VARCHAR(10),
  PRIMARY KEY (A, X),
  UNIQUE (X)
);
CREATE TABLE T2 (
  A VARCHAR(20),
  Y VARCHAR(10) UNIQUE,
  PRIMARY KEY (A, Y)
);
INSERT INTO T1 VALUES ('a', 'm');
INSERT INTO T1 VALUES ('b', 'n');
INSERT INTO T2 VALUES ('b', 'k');
SELECT A FROM T1 UNION ALL SELECT A FROM T2 ORDER BY A;
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
.restore emplyeee.db
.quit
.mode
CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID;
-- DATE

WITH RECURSIVE c(i) AS (VALUES(json_insert(1, '$[#]', 1)) UNION ALL SELECT i+1 FROM c WHERE i<10) INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c;
CREATE INDEX t1a ON t1(a);
CREATE TABLE t2(x,y);
CREATE TABLE t3(cnt);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) INSERT INTO t3(cnt) SELECT i FROM c;
SELECT count(*) FROM t1;
ANALYZE t1;
ALTER TABLE t1 ADD COLUMN extra_7817 INTEGER DEFAULT '';
INSERT OR ROLLBACK INTO t3 VALUES ('x');
SELECT * FROM t3 NATURAL JOIN t2;
SELECT MAX(ax) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t2_7091 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
CREATE TRIGGER IF NOT EXISTS trg_t2_2844 BEFORE UPDATE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT COUNT(*) FILTER (WHERE ax IS NOT NULL), SUM(rowid) FILTER (WHERE ax > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ax) FILTER (WHERE ax > 0 AND ax < 100), COUNT(*) FILTER (WHERE typeof(ax) = "text") FROM t1;
INSERT INTO t2 DEFAULT VALUES;
PRAGMA user_version;
VACUUM main;
INSERT INTO t1 VALUES (NULL, NULL, NULL);
SELECT COUNT(*) FILTER (WHERE A IS NOT NULL), SUM(rowid) FILTER (WHERE A > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(A) FILTER (WHERE A > 0 AND A < 100), COUNT(*) FILTER (WHERE typeof(A) = "text") FROM T1;
ALTER TABLE T2 ADD COLUMN extra_5851 BIGINT UNIQUE;
CREATE TABLE T (
  A VARCHAR(20),
  B VARCHAR(30),
  C VARCHAR(30),
  PRIMARY KEY (A, B),
  UNIQUE (A, C)
);
INSERT INTO T VALUES ('a', 'p', 'x');
INSERT INTO T VALUES ('a', 'q', 'y');
INSERT INTO T VALUES ('b', 'p', 'z');
INSERT INTO T VALUES ('c', 'r', 'w');
INSERT INTO T VALUES ('d', 's', 'v');
SELECT A, COUNT(DISTINCT B) AS D FROM T GROUP BY A HAVING COUNT(DISTINCT B) >= 1;
INSERT INTO T1 DEFAULT VALUES;
ALTER TABLE t1 DROP COLUMN b;
SELECT * FROM T1;
DROP INDEX IF EXISTS t1;
INSERT INTO T1 DEFAULT VALUES;
ANALYZE T1;
SELECT COUNT(*) FILTER (WHERE A IS NOT NULL), SUM(rowid) FILTER (WHERE A > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(A) FILTER (WHERE A > 0 AND A < 100), COUNT(*) FILTER (WHERE typeof(A) = "text") FROM T2;
ALTER TABLE t2 RENAME TO t2_r5486;
REINDEX T1;
ALTER TABLE T RENAME COLUMN B TO B_r934;
SELECT MAX(C) FROM T;
DROP TRIGGER IF EXISTS T1;
SELECT * FROM T WHERE EXISTS (SELECT 1 FROM T WHERE B = NULL);
INSERT INTO t3 VALUES (NULL);
DELETE FROM t1 WHERE b > (SELECT AVG(b) FROM t1) RETURNING *;
WITH cte AS (SELECT A, COUNT(*) AS cnt FROM T2 GROUP BY A) SELECT * FROM cte WHERE cnt > 1;
INSERT INTO T2 VALUES (NULL, NULL);
CREATE TABLE T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15),
  C BIGINT NOT NULL,
  UNIQUE (B, C)
);
INSERT INTO T VALUES ('a', 'p', 3000);
INSERT INTO T VALUES ('b', 'q', 9223372036854775807);
INSERT INTO T VALUES ('c', 'r', 1700);
INSERT INTO T VALUES ('e', 'q', -9223372036854775808);
INSERT INTO T VALUES ('f', 'r', 0);
SELECT B, COUNT(*) AS D, SUM(C) AS E, AVG(C) AS F FROM T GROUP BY B HAVING SUM(C) > 0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T2_6904 ON T2(Y) WHERE Y > 0;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t2_3173 AS SELECT y FROM t2;
REINDEX;
DELETE FROM t2 WHERE y IS NULL RETURNING *;
ALTER TABLE T1 ADD COLUMN extra_1526 DATETIME DEFAULT 0;
SELECT * FROM T2 AS a JOIN t2 AS b ON a.rowid = b.rowid;
ALTER TABLE T2 DROP COLUMN A;
CREATE TRIGGER IF NOT EXISTS trg_t2_1087 AFTER DELETE ON t2 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM T2 WHERE NOT EXISTS (SELECT 1 FROM T2 WHERE 1 = 0);
ALTER TABLE T2 RENAME COLUMN Y TO Y_r7222;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t2_8398 AS SELECT y FROM t2;
CREATE TRIGGER IF NOT EXISTS trg_t3_8421 AFTER UPDATE ON t3 FOR EACH ROW BEGIN SELECT RAISE(IGNORE); END;
WITH RECURSIVE tree(id, path) AS (VALUES(1, "/1") UNION ALL SELECT id+1, path || "/" || (id+1) FROM tree WHERE id<52) SELECT * FROM tree;
DELETE FROM t1 WHERE 0;
INSERT INTO t2 DEFAULT VALUES;
SELECT LAG(y, 1, NULL) OVER (ORDER BY y RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t2;
SELECT COUNT(*) FILTER (WHERE cnt IS NOT NULL), SUM(rowid) FILTER (WHERE cnt > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(cnt) FILTER (WHERE cnt > 0 AND cnt < 100), COUNT(*) FILTER (WHERE typeof(cnt) = "text") FROM t3;
SELECT AVG(y) FILTER (WHERE y != 0) OVER (ORDER BY y ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t2;
ALTER TABLE T ADD COLUMN extra_2647 CLOB DEFAULT (random());
SELECT MAX(A) FILTER (WHERE A IS NOT NULL) OVER (PARTITION BY A ORDER BY A GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T2;
CREATE  VIEW IF NOT EXISTS v_t2_1422 AS SELECT y FROM t2;
SELECT COUNT(*) FILTER (WHERE B IS NOT NULL), SUM(rowid) FILTER (WHERE B > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(B) FILTER (WHERE B > 0 AND B < 100), COUNT(*) FILTER (WHERE typeof(B) = "text") FROM T;
DELETE FROM T WHERE 0;
ALTER TABLE t3 DROP COLUMN cnt;
DROP VIEW IF EXISTS T1;
ALTER TABLE t3 ADD COLUMN extra_9250 CLOB COLLATE NOCASE;
UPDATE T2 SET A = json_object('k', A);
VACUUM;
SELECT * FROM t2 AS a JOIN t2 AS b ON a.rowid = b.rowid;
SELECT * FROM T2 WHERE Y > (SELECT COUNT(*) FROM T2);

SELECT COUNT(*) FROM t0;
PRAGMA cell_size_check = FALSE;
ALTER TABLE t0 DROP COLUMN x;
INSERT INTO t0 SELECT * FROM t0;
DROP VIEW IF EXISTS t0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t2_4278 ON t2(lower(y)) WHERE y > 0;

SELECT COUNT(*) FROM t2;
ALTER TABLE t2 ADD COLUMN extra_5455 TEXT NOT NULL DEFAULT 0;

SELECT COUNT(*) FROM t3;
UPDATE t1 SET b = b + 1 WHERE b IS NOT NULL RETURNING *;
ALTER TABLE T1 DROP COLUMN A;
UPDATE t2 SET y = -98 WHERE 1 RETURNING *;
CREATE  INDEX IF NOT EXISTS idx_T1_8251 ON T1(A) WHERE A IS NOT NULL;
CREATE  INDEX IF NOT EXISTS idx_T1_7156 ON T1(X) WHERE X > 0;
CREATE  INDEX IF NOT EXISTS idx_T2_8348 ON T2(A) WHERE A > 0;
DETACH DATABASE aux50;
SELECT * FROM t2 AS a JOIN T AS b ON a.rowid = b.rowid;
ALTER TABLE t2 RENAME TO t2_r2201;
ALTER TABLE T RENAME TO T_r7326;

SELECT COUNT(*) FROM t2;
DETACH DATABASE aux69;
SELECT * FROM T WHERE C >= ANY (SELECT C FROM T);
ALTER TABLE t1 RENAME TO t1_r1356;
UPDATE t1 SET ax = 1;
DROP INDEX IF EXISTS t2;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_4875 ON t1(ax COLLATE NOCASE) WHERE ax IS NOT NULL;
INSERT INTO T VALUES (1, 'x', 'x') ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
INSERT INTO t0 VALUES ('x', NULL, 'x') ON CONFLICT(x) DO UPDATE SET x = excluded.x, y = excluded.y, z = excluded.z;
DROP INDEX IF EXISTS t3;
CREATE TRIGGER IF NOT EXISTS trg_t3_2292 AFTER INSERT ON t3 BEGIN SELECT RAISE(ABORT, 'abort'); END;
```

## Actual output

```sql
PRAGMA short_column_names = OFF;
ATTACH DATABASE ':memory:' AS aux69;
PRAGMA vdbe_debug = OFF;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (1, 'Wernher', 10, 100);
INSERT INTO t1 VALUES (2, 'von', 20, 200);
INSERT INTO t1 VALUES (3, 'Braun', 30, 300);

CREATE INDEX t1bc ON t1(b, c);

PRAGMA writable_schema = ON;

.imposter t1bc t2
CREATE TABLE "t2"("b","c","_ROWID_",PRIMARY KEY("b","c","_ROWID_"))WITHOUT ROWID;
WARNING: writing to an imposter table will corrupt the "t1bc" index!

SELECT * FROM t2;
Braun|30|3
Wernher|10|1
von|20|2

SELECT b, c FROM t1 ORDER BY b, c;
Braun|30
Wernher|10
von|20

.quit
```

## Expectation

```sql
PRAGMA short_column_names = OFF;
ATTACH DATABASE ':memory:' AS aux69;
PRAGMA vdbe_debug = OFF;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (1, 'Wernher', 10, 100);
INSERT INTO t1 VALUES (2, 'von', 20, 200);
INSERT INTO t1 VALUES (3, 'Braun', 30, 300);

CREATE INDEX t1bc ON t1(b, c);

PRAGMA writable_schema = ON;

.imposter t1bc t2
CREATE TABLE "t2"("b","c","_ROWID_",PRIMARY KEY("b","c","_ROWID_"))WITHOUT ROWID;

SELECT * FROM t2;
Braun|30|3
Wernher|10|1
von|20|2

SELECT b, c FROM t1 ORDER BY b, c;
Braun|30
Wernher|10
von|20

.quit
```

## Flag

```
-echo
```

