## 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
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
SAVEPOINT sp7292;
BEGIN IMMEDIATE TRANSACTION;
.print
BEGIN DEFERRED TRANSACTION;
PRAGMA synchronous;
ATTACH DATABASE ':memory:' AS aux73;
SAVEPOINT sp987;
ATTACH DATABASE ':memory:' AS aux76;
CREATE TABLE t1(a BIGINT PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((likelihood(length('hello'), -(-('('))) + 2147483646), '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
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
SELECT * FROM T2;
SELECT * FROM T2 AS a RIGHT JOIN T2 AS b ON a.rowid = b.rowid;
DETACH DATABASE aux76;
INSERT INTO T2 DEFAULT VALUES;
ALTER TABLE T2 DROP COLUMN a;
VACUUM main;

ROLLBACK TRANSACTION TO SAVEPOINT sp987;
RELEASE SAVEPOINT sp987;
SELECT GROUP_CONCAT(a, '.') OVER (PARTITION BY a ORDER BY a ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM T2;
SELECT * FROM T1;
CREATE  VIEW IF NOT EXISTS v_T1_5205 AS SELECT a FROM T1;
DETACH DATABASE aux73;
CREATE TRIGGER IF NOT EXISTS trg_T2_2706 AFTER UPDATE OF b ON T2 BEGIN SELECT RAISE(IGNORE); END;
ALTER TABLE T2 DROP COLUMN b;
ANALYZE;
END TRANSACTION;
DELETE FROM t1 WHERE d > (SELECT AVG(d) FROM t1);

SELECT COUNT(*) FROM t1;
ALTER TABLE t1 RENAME TO t1_r9370;
CREATE TRIGGER IF NOT EXISTS trg_t1_5404 BEFORE UPDATE OF a ON t1 FOR EACH ROW BEGIN INSERT INTO t1(a) VALUES (NULL); END;
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;
ANALYZE;
SELECT TOTAL(b) FROM T1;
REINDEX;
PRAGMA journal_mode = 'PERSIST';
ANALYZE;

ANALYZE T2;
WITH cte AS (SELECT a, COUNT(*) FROM T2 GROUP BY a) SELECT * FROM cte;
ANALYZE;
VACUUM;
COMMIT;
INSERT INTO t1 SELECT * FROM t1;
SELECT * FROM T2 WHERE a > ANY (SELECT a FROM T2);
ROLLBACK TRANSACTION TO SAVEPOINT sp7292;
RELEASE SAVEPOINT sp7292;
REINDEX;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
SAVEPOINT sp7292;
BEGIN IMMEDIATE TRANSACTION;
.print
BEGIN DEFERRED TRANSACTION;
PRAGMA synchronous;
ATTACH DATABASE ':memory:' AS aux73;
SAVEPOINT sp987;
ATTACH DATABASE ':memory:' AS aux76;
CREATE TABLE t1(a BIGINT PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((likelihood(length('hello'), -(-(9223372036854775807))) + 0.0), '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
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
SELECT * FROM T2;
SELECT * FROM T2 AS a RIGHT JOIN T2 AS b ON a.rowid = b.rowid;
DETACH DATABASE aux76;
INSERT INTO T2 DEFAULT VALUES;
ALTER TABLE T2 DROP COLUMN a;
VACUUM main;

ROLLBACK TRANSACTION TO SAVEPOINT sp987;
RELEASE SAVEPOINT sp987;
SELECT GROUP_CONCAT(a, '.') OVER (PARTITION BY a ORDER BY a ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM T2;
SELECT * FROM T1;
CREATE  VIEW IF NOT EXISTS v_T1_5205 AS SELECT a FROM T1;
DETACH DATABASE aux73;
CREATE TRIGGER IF NOT EXISTS trg_T2_2706 AFTER UPDATE OF b ON T2 BEGIN SELECT RAISE(IGNORE); END;
ALTER TABLE T2 DROP COLUMN b;
ANALYZE;
END TRANSACTION;
DELETE FROM t1 WHERE d > (SELECT AVG(d) FROM t1);

SELECT COUNT(*) FROM t1;
ALTER TABLE t1 RENAME TO t1_r9370;
CREATE TRIGGER IF NOT EXISTS trg_t1_5404 BEFORE UPDATE OF a ON t1 FOR EACH ROW BEGIN INSERT INTO t1(a) VALUES (NULL); END;
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;
ANALYZE;
SELECT TOTAL(b) FROM T1;
REINDEX;
PRAGMA journal_mode = 'PERSIST';
ANALYZE;

ANALYZE T2;
WITH cte AS (SELECT a, COUNT(*) FROM T2 GROUP BY a) SELECT * FROM cte;
ANALYZE;
VACUUM;
COMMIT;
INSERT INTO t1 SELECT * FROM t1;
SELECT * FROM T2 WHERE a > ANY (SELECT a FROM T2);
ROLLBACK TRANSACTION TO SAVEPOINT sp7292;
RELEASE SAVEPOINT sp7292;
REINDEX;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
SAVEPOINT sp7292;
BEGIN IMMEDIATE TRANSACTION;
.print
BEGIN DEFERRED TRANSACTION;
PRAGMA synchronous;
ATTACH DATABASE ':memory:' AS aux73;
SAVEPOINT sp987;
ATTACH DATABASE ':memory:' AS aux76;
CREATE TABLE t1(a BIGINT PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((likelihood(length('hello'), -(-(9223372036854775807))) + 0.0), '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
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
SELECT * FROM T2;
SELECT * FROM T2 AS a RIGHT JOIN T2 AS b ON a.rowid = b.rowid;
DETACH DATABASE aux76;
INSERT INTO T2 DEFAULT VALUES;
ALTER TABLE T2 DROP COLUMN a;
VACUUM main;

ROLLBACK TRANSACTION TO SAVEPOINT sp987;
RELEASE SAVEPOINT sp987;
SELECT GROUP_CONCAT(a, '.') OVER (PARTITION BY a ORDER BY a ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM T2;
SELECT * FROM T1;
CREATE  VIEW IF NOT EXISTS v_T1_5205 AS SELECT a FROM T1;
DETACH DATABASE aux73;
CREATE TRIGGER IF NOT EXISTS trg_T2_2706 AFTER UPDATE OF b ON T2 BEGIN SELECT RAISE(IGNORE); END;
ALTER TABLE T2 DROP COLUMN b;
ANALYZE;
END TRANSACTION;
DELETE FROM t1 WHERE d > (SELECT AVG(d) FROM t1);

SELECT COUNT(*) FROM t1;
ALTER TABLE t1 RENAME TO t1_r9370;
CREATE TRIGGER IF NOT EXISTS trg_t1_5404 BEFORE UPDATE OF a ON t1 FOR EACH ROW BEGIN INSERT INTO t1(a) VALUES (NULL); END;
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;
ANALYZE;
SELECT TOTAL(b) FROM T1;
REINDEX;
PRAGMA journal_mode = 'PERSIST';
ANALYZE;

ANALYZE T2;
WITH cte AS (SELECT a, COUNT(*) FROM T2 GROUP BY a) SELECT * FROM cte;
ANALYZE;
VACUUM;
COMMIT;
INSERT INTO t1 SELECT * FROM t1;
SELECT * FROM T2 WHERE a > ANY (SELECT a FROM T2);
ROLLBACK TRANSACTION TO SAVEPOINT sp7292;
RELEASE SAVEPOINT sp7292;
REINDEX;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
SAVEPOINT sp7292;
BEGIN IMMEDIATE TRANSACTION;
.print
BEGIN DEFERRED TRANSACTION;
PRAGMA synchronous;
ATTACH DATABASE ':memory:' AS aux73;
SAVEPOINT sp987;
ATTACH DATABASE ':memory:' AS aux76;
CREATE TABLE t1(a BIGINT PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((likelihood(length('hello'), -(-(9223372036854775807))) + 0.0), '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
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
SELECT * FROM T2;
SELECT * FROM T2 AS a RIGHT JOIN T2 AS b ON a.rowid = b.rowid;
DETACH DATABASE aux76;
INSERT INTO T2 DEFAULT VALUES;
ALTER TABLE T2 DROP COLUMN a;
VACUUM main;

ROLLBACK TRANSACTION TO SAVEPOINT sp987;
RELEASE SAVEPOINT sp987;
SELECT GROUP_CONCAT(a, '.') OVER (PARTITION BY a ORDER BY a ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM T2;
SELECT * FROM T1;
CREATE  VIEW IF NOT EXISTS v_T1_5205 AS SELECT a FROM T1;
DETACH DATABASE aux73;
CREATE TRIGGER IF NOT EXISTS trg_T2_2706 AFTER UPDATE OF b ON T2 BEGIN SELECT RAISE(IGNORE); END;
ALTER TABLE T2 DROP COLUMN b;
ANALYZE;
END TRANSACTION;
DELETE FROM t1 WHERE d > (SELECT AVG(d) FROM t1);

SELECT COUNT(*) FROM t1;
ALTER TABLE t1 RENAME TO t1_r9370;
CREATE TRIGGER IF NOT EXISTS trg_t1_5404 BEFORE UPDATE OF a ON t1 FOR EACH ROW BEGIN INSERT INTO t1(a) VALUES (NULL); END;
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;
ANALYZE;
SELECT TOTAL(b) FROM T1;
REINDEX;
PRAGMA journal_mode = 'PERSIST';
ANALYZE;

ANALYZE T2;
WITH cte AS (SELECT a, COUNT(*) FROM T2 GROUP BY a) SELECT * FROM cte;
ANALYZE;
VACUUM;
COMMIT;
INSERT INTO t1 SELECT * FROM t1;
SELECT * FROM T2 WHERE a > ANY (SELECT a FROM T2);
ROLLBACK TRANSACTION TO SAVEPOINT sp7292;
RELEASE SAVEPOINT sp7292;
REINDEX;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
SAVEPOINT sp7292;
BEGIN IMMEDIATE TRANSACTION;
.print
BEGIN DEFERRED TRANSACTION;
PRAGMA synchronous;
ATTACH DATABASE ':memory:' AS aux73;
SAVEPOINT sp987;
ATTACH DATABASE ':memory:' AS aux76;
CREATE TABLE t1(a BIGINT PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((likelihood(length('hello'), -(-(9223372036854775807))) + 0.0), '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
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
SELECT * FROM T2;
SELECT * FROM T2 AS a RIGHT JOIN T2 AS b ON a.rowid = b.rowid;
DETACH DATABASE aux76;
INSERT INTO T2 DEFAULT VALUES;
ALTER TABLE T2 DROP COLUMN a;
VACUUM main;

ROLLBACK TRANSACTION TO SAVEPOINT sp987;
RELEASE SAVEPOINT sp987;
SELECT GROUP_CONCAT(a, '.') OVER (PARTITION BY a ORDER BY a ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM T2;
SELECT * FROM T1;
CREATE  VIEW IF NOT EXISTS v_T1_5205 AS SELECT a FROM T1;
DETACH DATABASE aux73;
CREATE TRIGGER IF NOT EXISTS trg_T2_2706 AFTER UPDATE OF b ON T2 BEGIN SELECT RAISE(IGNORE); END;
ALTER TABLE T2 DROP COLUMN b;
ANALYZE;
END TRANSACTION;
DELETE FROM t1 WHERE d > (SELECT AVG(d) FROM t1);

SELECT COUNT(*) FROM t1;
ALTER TABLE t1 RENAME TO t1_r9370;
CREATE TRIGGER IF NOT EXISTS trg_t1_5404 BEFORE UPDATE OF a ON t1 FOR EACH ROW BEGIN INSERT INTO t1(a) VALUES (NULL); END;
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;
ANALYZE;
SELECT TOTAL(b) FROM T1;
REINDEX;
PRAGMA journal_mode = 'PERSIST';
ANALYZE;

ANALYZE T2;
WITH cte AS (SELECT a, COUNT(*) FROM T2 GROUP BY a) SELECT * FROM cte;
ANALYZE;
VACUUM;
COMMIT;
INSERT INTO t1 SELECT * FROM t1;
SELECT * FROM T2 WHERE a > ANY (SELECT a FROM T2);
ROLLBACK TRANSACTION TO SAVEPOINT sp7292;
RELEASE SAVEPOINT sp7292;
REINDEX;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
SAVEPOINT sp7292;
BEGIN IMMEDIATE TRANSACTION;
.print
BEGIN DEFERRED TRANSACTION;
PRAGMA synchronous;
ATTACH DATABASE ':memory:' AS aux73;
SAVEPOINT sp987;
ATTACH DATABASE ':memory:' AS aux76;
CREATE TABLE t1(a BIGINT PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((likelihood(length('hello'), -(-(9223372036854775807))) + 0.0), '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
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
SELECT * FROM T2;
SELECT * FROM T2 AS a RIGHT JOIN T2 AS b ON a.rowid = b.rowid;
DETACH DATABASE aux76;
INSERT INTO T2 DEFAULT VALUES;
ALTER TABLE T2 DROP COLUMN a;
VACUUM main;

ROLLBACK TRANSACTION TO SAVEPOINT sp987;
RELEASE SAVEPOINT sp987;
SELECT GROUP_CONCAT(a, '.') OVER (PARTITION BY a ORDER BY a ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM T2;
SELECT * FROM T1;
CREATE  VIEW IF NOT EXISTS v_T1_5205 AS SELECT a FROM T1;
DETACH DATABASE aux73;
CREATE TRIGGER IF NOT EXISTS trg_T2_2706 AFTER UPDATE OF b ON T2 BEGIN SELECT RAISE(IGNORE); END;
ALTER TABLE T2 DROP COLUMN b;
ANALYZE;
END TRANSACTION;
DELETE FROM t1 WHERE d > (SELECT AVG(d) FROM t1);

SELECT COUNT(*) FROM t1;
ALTER TABLE t1 RENAME TO t1_r9370;
CREATE TRIGGER IF NOT EXISTS trg_t1_5404 BEFORE UPDATE OF a ON t1 FOR EACH ROW BEGIN INSERT INTO t1(a) VALUES (NULL); END;
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;
ANALYZE;
SELECT TOTAL(b) FROM T1;
REINDEX;
PRAGMA journal_mode = 'PERSIST';
ANALYZE;

ANALYZE T2;
WITH cte AS (SELECT a, COUNT(*) FROM T2 GROUP BY a) SELECT * FROM cte;
ANALYZE;
VACUUM;
COMMIT;
INSERT INTO t1 SELECT * FROM t1;
SELECT * FROM T2 WHERE a > ANY (SELECT a FROM T2);
ROLLBACK TRANSACTION TO SAVEPOINT sp7292;
RELEASE SAVEPOINT sp7292;
REINDEX;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
SAVEPOINT sp7292;
BEGIN IMMEDIATE TRANSACTION;
.print
BEGIN DEFERRED TRANSACTION;
PRAGMA synchronous;
ATTACH DATABASE ':memory:' AS aux73;
SAVEPOINT sp987;
ATTACH DATABASE ':memory:' AS aux76;
CREATE TABLE t1(a BIGINT PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((likelihood(length('hello'), -(-(9223372036854775807))) + 0.0), '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
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
SELECT * FROM T2;
SELECT * FROM T2 AS a RIGHT JOIN T2 AS b ON a.rowid = b.rowid;
DETACH DATABASE aux76;
INSERT INTO T2 DEFAULT VALUES;
ALTER TABLE T2 DROP COLUMN a;
VACUUM main;

ROLLBACK TRANSACTION TO SAVEPOINT sp987;
RELEASE SAVEPOINT sp987;
SELECT GROUP_CONCAT(a, '.') OVER (PARTITION BY a ORDER BY a ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM T2;
SELECT * FROM T1;
CREATE  VIEW IF NOT EXISTS v_T1_5205 AS SELECT a FROM T1;
DETACH DATABASE aux73;
CREATE TRIGGER IF NOT EXISTS trg_T2_2706 AFTER UPDATE OF b ON T2 BEGIN SELECT RAISE(IGNORE); END;
ALTER TABLE T2 DROP COLUMN b;
ANALYZE;
END TRANSACTION;
DELETE FROM t1 WHERE d > (SELECT AVG(d) FROM t1);

SELECT COUNT(*) FROM t1;
ALTER TABLE t1 RENAME TO t1_r9370;
CREATE TRIGGER IF NOT EXISTS trg_t1_5404 BEFORE UPDATE OF a ON t1 FOR EACH ROW BEGIN INSERT INTO t1(a) VALUES (NULL); END;
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;
ANALYZE;
SELECT TOTAL(b) FROM T1;
REINDEX;
PRAGMA journal_mode = 'PERSIST';
ANALYZE;

ANALYZE T2;
WITH cte AS (SELECT a, COUNT(*) FROM T2 GROUP BY a) SELECT * FROM cte;
ANALYZE;
VACUUM;
COMMIT;
INSERT INTO t1 SELECT * FROM t1;
SELECT * FROM T2 WHERE a > ANY (SELECT a FROM T2);
ROLLBACK TRANSACTION TO SAVEPOINT sp7292;
RELEASE SAVEPOINT sp7292;
REINDEX;

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))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT OR ROLLBACK INTO T1 VALUES (6, 0);
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);
```

## Actual output

```sql
Usage: /home/test/sqlite3-src/build/sqlite3 [OPTIONS] FILENAME [SQL]
FILENAME is the name of an SQLite database. A new database is created
if the file does not previously exist.
OPTIONS include:
   -append              append the database to the end of the file
   -ascii               set output mode to 'ascii'
   -bail                stop after hitting an error
   -batch               force batch I/O
   -box                 set output mode to 'box'
   -column              set output mode to 'column'
   -cmd COMMAND         run "COMMAND" before reading stdin
   -csv                 set output mode to 'csv'
   -deserialize         open the database using sqlite3_deserialize()
   -echo                print commands before execution
   -init FILENAME       read/process named file
   -[no]header          turn headers on or off
   -help                show this message
   -html                set output mode to HTML
   -interactive         force interactive I/O
   -json                set output mode to 'json'
   -line                set output mode to 'line'
   -list                set output mode to 'list'
   -lookaside SIZE N    use N entries of SZ bytes for lookaside memory
   -markdown            set output mode to 'markdown'
   -maxsize N           maximum size for a --deserialize database
   -memtrace            trace all memory allocations and deallocations
   -mmap N              default mmap size set to N
   -newline SEP         set output row separator. Default: '\n'
   -nofollow            refuse to open symbolic links to database files
   -nonce STRING        set the safe-mode escape nonce
   -nullvalue TEXT      set text string for NULL values. Default ''
   -pagecache SIZE N    use N slots of SZ bytes each for page cache memory
   -quote               set output mode to 'quote'
   -readonly            open the database read-only
   -safe                enable safe-mode
   -separator SEP       set output column separator. Default: '|'
   -stats               print memory stats before each finalize
   -table               set output mode to 'table'
   -tabs                set output mode to 'tabs'
   -version             show SQLite version
   -vfs NAME            use NAME as the default VFS
```

## Expectation

```sql

```

## Flag

```
-help
```

