## 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
ATTACH DATABASE ':memory:' AS aux73;
PRAGMA user_version = 999;

.help
.help .archive
.help .auth
.help .backup
.help .bail
.help .cd
.help .changes
.help .check
.help .clone
.help .connection
.help .databases
.help .dbconfig
.help .dbinfo
.help .dump
.help .echo
.help .eqp
.help .excel
.help .exit
.help .expert
.help .explain
.help .filectrl
.help .fullschema
.help .headers
.help .help
.help .import
.help .imposter
.help .indexes
.help .limit
.help .lint
.help .load
.help .log
.help .mode
.help .nonce
.help .nullvalue
.help .once
.help .open
.help .output
.help .parameter
.help .print
.help .progress
.help .prompt
.help .quit
.help .read
.help .recover
.help .restore
.help .save
.help .scanstats
.help .schema
.help .separator
.help .sha3sum
.help .shell
.help .show
.help .stats
.help .system
.help .tables
.help .timeout
.help .timer
.help .trace
.help .version
.help .vfsinfo
.help .vfslist
.help .vfsname
.help .width
 
.quit
PRAGMA trusted_schema;
.system echo "mwahaha i am root"
BEGIN EXCLUSIVE;
.imposter off
ATTACH DATABASE ':memory:' AS aux0;
CREATE TABLE T (
  a DECIMAL(10,5),
  b REAL,
  c REAL
);
INSERT INTO T VALUES (cos(unistr_quote(CAST(log(length('你好'), hex(123.456)) AS NONE))),1.5,10.0), (2,-2.5,20.0), (3,-9e999,30.0);
SELECT * FROM T WHERE b < 2.0 ORDER BY b;
PRAGMA secure_delete = NO;
CREATE TABLE main.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
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
DETACH DATABASE aux0;
WITH cte AS (SELECT b, COUNT(*) FROM T GROUP BY b) SELECT * FROM cte;
CREATE  INDEX IF NOT EXISTS idx_t1_2751 ON t1(lower(b));
COMMIT TRANSACTION;
DELETE FROM t1 WHERE c IS NULL;
SELECT * FROM T AS a INNER JOIN T AS b ON a.rowid = b.rowid;
SELECT PERCENT_RANK() OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT * FROM t1 AS a RIGHT JOIN T AS b ON a.rowid = b.rowid;
SELECT * FROM t1 t1 RIGHT JOIN t1 t2 ON t1.c = (SELECT c FROM t1 WHERE c = t1.c);
SELECT MAX(c) OVER (PARTITION BY c ORDER BY c GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
ALTER TABLE T RENAME COLUMN a TO a_r7648;
CREATE  INDEX IF NOT EXISTS idx_T_3011 ON T(lower(b)) WHERE b IS NOT NULL;
CREATE TABLE T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15) NOT NULL,
  C DOUBLE PRECISION
);
INSERT INTO T VALUES ('a', 'p', -1.7976931348623157e+308);
INSERT INTO T VALUES ('b', 'q', -0.000000001);
INSERT INTO T VALUES ('c', 'r', 0.0);
INSERT INTO T VALUES ('d', 's', 3.14159265358979);
INSERT INTO T VALUES ('e', 't', 1.7976931348623157e+308);
INSERT INTO T VALUES ('f', 't', 750.25);
SELECT B, AVG(C) AS D, MIN(C) AS E, MAX(C) AS F FROM T GROUP BY B;
INSERT OR IGNORE INTO t1 VALUES ('', '', NULL, 'x');
ALTER TABLE T ADD COLUMN extra_5980 NATIVE CHARACTER(70)NVARCHAR(100) DEFAULT (random());
WITH n AS NOT MATERIALIZED (SELECT * FROM t1) SELECT * FROM n WHERE a > 0;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7823 AS SELECT B FROM T;
INSERT OR IGNORE INTO T VALUES ('', 0, 0);
.quit
PRAGMA trusted_schema;
.system echo "mwahaha i am root"
BEGIN EXCLUSIVE;
.imposter off
ATTACH DATABASE ':memory:' AS aux0;
CREATE TABLE T (
  a INTEGER,
  b REAL,
  c REAL
);
INSERT INTO T VALUES (cos(unistr_quote(CAST(log(length('你好'), hex(123.456)) AS NONE))),1.5,10.0), (2,-2.5,20.0), (3,-9e999,30.0);
SELECT * FROM T WHERE b < 2.0 ORDER BY b;
PRAGMA secure_delete = NO;
CREATE TABLE main.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
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
DETACH DATABASE aux0;
WITH cte AS (SELECT b, COUNT(*) FROM T GROUP BY b) SELECT * FROM cte;
CREATE  INDEX IF NOT EXISTS idx_t1_2751 ON t1(lower(b));
COMMIT TRANSACTION;
DELETE FROM t1 WHERE c IS NULL;
SELECT * FROM T AS a INNER JOIN T AS b ON a.rowid = b.rowid;
SELECT PERCENT_RANK() OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT * FROM t1 AS a RIGHT JOIN T AS b ON a.rowid = b.rowid;
SELECT * FROM t1 t1 RIGHT JOIN t1 t2 ON t1.c = (SELECT c FROM t1 WHERE c = t1.c);
SELECT MAX(c) OVER (PARTITION BY c ORDER BY c GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
ALTER TABLE T RENAME COLUMN a TO a_r7648;
CREATE  INDEX IF NOT EXISTS idx_T_3011 ON T(lower(b)) WHERE b IS NOT NULL;
CREATE TABLE T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15) NOT NULL,
  C DOUBLE PRECISION
);
INSERT INTO T VALUES ('a', 'p', -1.7976931348623157e+308);
INSERT INTO T VALUES ('b', 'q', -0.000000001);
INSERT INTO T VALUES ('c', 'r', 0.0);
INSERT INTO T VALUES ('d', 's', 3.14159265358979);
INSERT INTO T VALUES ('e', 't', 1.7976931348623157e+308);
INSERT INTO T VALUES ('f', 't', 750.25);
SELECT B, AVG(C) AS D, MIN(C) AS E, MAX(C) AS F FROM T GROUP BY B;
INSERT OR IGNORE INTO t1 VALUES ('', '', NULL, 'x');
ALTER TABLE T ADD COLUMN extra_5980 NATIVE CHARACTER(70)NVARCHAR(100) DEFAULT (random());
WITH n AS NOT MATERIALIZED (SELECT * FROM t1) SELECT * FROM n WHERE a > 0;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7823 AS SELECT B FROM T;
INSERT OR IGNORE INTO T VALUES ('', 0, 0);
.quit
PRAGMA trusted_schema;
.system echo "mwahaha i am root"
BEGIN EXCLUSIVE;
.imposter off
ATTACH DATABASE ':memory:' AS aux0;
CREATE TABLE T (
  a INTEGER,
  b REAL,
  c REAL
);
INSERT INTO T VALUES (cos(unistr_quote(CAST(log(length('你好'), hex(123.456)) AS NONE))),1.5,10.0), (2,-2.5,20.0), (3,-9e999,30.0);
SELECT * FROM T WHERE b < 2.0 ORDER BY b;
PRAGMA secure_delete = NO;
CREATE TABLE main.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
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
DETACH DATABASE aux0;
WITH cte AS (SELECT b, COUNT(*) FROM T GROUP BY b) SELECT * FROM cte;
CREATE  INDEX IF NOT EXISTS idx_t1_2751 ON t1(lower(b));
COMMIT TRANSACTION;
DELETE FROM t1 WHERE c IS NULL;
SELECT * FROM T AS a INNER JOIN T AS b ON a.rowid = b.rowid;
SELECT PERCENT_RANK() OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT * FROM t1 AS a RIGHT JOIN T AS b ON a.rowid = b.rowid;
SELECT * FROM t1 t1 RIGHT JOIN t1 t2 ON t1.c = (SELECT c FROM t1 WHERE c = t1.c);
SELECT MAX(c) OVER (PARTITION BY c ORDER BY c GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
ALTER TABLE T RENAME COLUMN a TO a_r7648;
CREATE  INDEX IF NOT EXISTS idx_T_3011 ON T(lower(b)) WHERE b IS NOT NULL;
CREATE TABLE T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15) NOT NULL,
  C DOUBLE PRECISION
);
INSERT INTO T VALUES ('a', 'p', -1.7976931348623157e+308);
INSERT INTO T VALUES ('b', 'q', -0.000000001);
INSERT INTO T VALUES ('c', 'r', 0.0);
INSERT INTO T VALUES ('d', 's', 3.14159265358979);
INSERT INTO T VALUES ('e', 't', 1.7976931348623157e+308);
INSERT INTO T VALUES ('f', 't', 750.25);
SELECT B, AVG(C) AS D, MIN(C) AS E, MAX(C) AS F FROM T GROUP BY B;
INSERT OR IGNORE INTO t1 VALUES ('', '', NULL, 'x');
ALTER TABLE T ADD COLUMN extra_5980 NATIVE CHARACTER(70)NVARCHAR(100) DEFAULT (random());
WITH n AS NOT MATERIALIZED (SELECT * FROM t1) SELECT * FROM n WHERE a > 0;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7823 AS SELECT B FROM T;
INSERT OR IGNORE INTO T VALUES ('', 0, 0);
.quit
PRAGMA trusted_schema;
.system echo "mwahaha i am root"
BEGIN EXCLUSIVE;
.imposter off
ATTACH DATABASE ':memory:' AS aux0;
CREATE TABLE T (
  a INTEGER,
  b REAL,
  c REAL
);
INSERT INTO T VALUES (cos(unistr_quote(CAST(log(length('你好'), hex(123.456)) AS NONE))),1.5,10.0), (2,-2.5,20.0), (3,-9e999,30.0);
SELECT * FROM T WHERE b < 2.0 ORDER BY b;
PRAGMA secure_delete = NO;
CREATE TABLE main.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
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
DETACH DATABASE aux0;
WITH cte AS (SELECT b, COUNT(*) FROM T GROUP BY b) SELECT * FROM cte;
CREATE  INDEX IF NOT EXISTS idx_t1_2751 ON t1(lower(b));
COMMIT TRANSACTION;
DELETE FROM t1 WHERE c IS NULL;
SELECT * FROM T AS a INNER JOIN T AS b ON a.rowid = b.rowid;
SELECT PERCENT_RANK() OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT * FROM t1 AS a RIGHT JOIN T AS b ON a.rowid = b.rowid;
SELECT * FROM t1 t1 RIGHT JOIN t1 t2 ON t1.c = (SELECT c FROM t1 WHERE c = t1.c);
SELECT MAX(c) OVER (PARTITION BY c ORDER BY c GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
ALTER TABLE T RENAME COLUMN a TO a_r7648;
CREATE  INDEX IF NOT EXISTS idx_T_3011 ON T(lower(b)) WHERE b IS NOT NULL;
CREATE TABLE T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15) NOT NULL,
  C DOUBLE PRECISION
);
INSERT INTO T VALUES ('a', 'p', -1.7976931348623157e+308);
INSERT INTO T VALUES ('b', 'q', -0.000000001);
INSERT INTO T VALUES ('c', 'r', 0.0);
INSERT INTO T VALUES ('d', 's', 3.14159265358979);
INSERT INTO T VALUES ('e', 't', 1.7976931348623157e+308);
INSERT INTO T VALUES ('f', 't', 750.25);
SELECT B, AVG(C) AS D, MIN(C) AS E, MAX(C) AS F FROM T GROUP BY B;
INSERT OR IGNORE INTO t1 VALUES ('', '', NULL, 'x');
ALTER TABLE T ADD COLUMN extra_5980 NATIVE CHARACTER(70)NVARCHAR(100) DEFAULT (random());
WITH n AS NOT MATERIALIZED (SELECT * FROM t1) SELECT * FROM n WHERE a > 0;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7823 AS SELECT B FROM T;
INSERT OR IGNORE INTO T VALUES ('', 0, 0);
.quit
PRAGMA trusted_schema;
.system echo "mwahaha i am root"
BEGIN EXCLUSIVE;
.imposter off
ATTACH DATABASE ':memory:' AS aux0;
CREATE TABLE T (
  a INTEGER,
  b REAL,
  c REAL
);
INSERT INTO T VALUES (cos(unistr_quote(CAST(log(length('你好'), hex(123.456)) AS NONE))),1.5,10.0), (2,-2.5,20.0), (3,-9e999,30.0);
SELECT * FROM T WHERE b < 2.0 ORDER BY b;
PRAGMA secure_delete = NO;
CREATE TABLE main.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
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
DETACH DATABASE aux0;
WITH cte AS (SELECT b, COUNT(*) FROM T GROUP BY b) SELECT * FROM cte;
CREATE  INDEX IF NOT EXISTS idx_t1_2751 ON t1(lower(b));
COMMIT TRANSACTION;
DELETE FROM t1 WHERE c IS NULL;
SELECT * FROM T AS a INNER JOIN T AS b ON a.rowid = b.rowid;
SELECT PERCENT_RANK() OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT * FROM t1 AS a RIGHT JOIN T AS b ON a.rowid = b.rowid;
SELECT * FROM t1 t1 RIGHT JOIN t1 t2 ON t1.c = (SELECT c FROM t1 WHERE c = t1.c);
SELECT MAX(c) OVER (PARTITION BY c ORDER BY c GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
ALTER TABLE T RENAME COLUMN a TO a_r7648;
CREATE  INDEX IF NOT EXISTS idx_T_3011 ON T(lower(b)) WHERE b IS NOT NULL;
CREATE TABLE T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15) NOT NULL,
  C DOUBLE PRECISION
);
INSERT INTO T VALUES ('a', 'p', -1.7976931348623157e+308);
INSERT INTO T VALUES ('b', 'q', -0.000000001);
INSERT INTO T VALUES ('c', 'r', 0.0);
INSERT INTO T VALUES ('d', 's', 3.14159265358979);
INSERT INTO T VALUES ('e', 't', 1.7976931348623157e+308);
INSERT INTO T VALUES ('f', 't', 750.25);
SELECT B, AVG(C) AS D, MIN(C) AS E, MAX(C) AS F FROM T GROUP BY B;
INSERT OR IGNORE INTO t1 VALUES ('', '', NULL, 'x');
ALTER TABLE T ADD COLUMN extra_5980 NATIVE CHARACTER(70)NVARCHAR(100) DEFAULT (random());
WITH n AS NOT MATERIALIZED (SELECT * FROM t1) SELECT * FROM n WHERE a > 0;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7823 AS SELECT B FROM T;
INSERT OR IGNORE INTO T VALUES ('', 0, 0);
.quit
PRAGMA trusted_schema;
.system echo "mwahaha i am root"
BEGIN EXCLUSIVE;
.imposter off
ATTACH DATABASE ':memory:' AS aux0;
CREATE TABLE T (
  a INTEGER,
  b REAL,
  c REAL
);
INSERT INTO T VALUES (cos(unistr_quote(CAST(log(length('你好'), hex(123.456)) AS NONE))),1.5,10.0), (2,-2.5,20.0), (3,-9e999,30.0);
SELECT * FROM T WHERE b < 2.0 ORDER BY b;
PRAGMA secure_delete = NO;
CREATE TABLE main.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
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
DETACH DATABASE aux0;
WITH cte AS (SELECT b, COUNT(*) FROM T GROUP BY b) SELECT * FROM cte;
CREATE  INDEX IF NOT EXISTS idx_t1_2751 ON t1(lower(b));
COMMIT TRANSACTION;
DELETE FROM t1 WHERE c IS NULL;
SELECT * FROM T AS a INNER JOIN T AS b ON a.rowid = b.rowid;
SELECT PERCENT_RANK() OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT * FROM t1 AS a RIGHT JOIN T AS b ON a.rowid = b.rowid;
SELECT * FROM t1 t1 RIGHT JOIN t1 t2 ON t1.c = (SELECT c FROM t1 WHERE c = t1.c);
SELECT MAX(c) OVER (PARTITION BY c ORDER BY c GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
ALTER TABLE T RENAME COLUMN a TO a_r7648;
CREATE  INDEX IF NOT EXISTS idx_T_3011 ON T(lower(b)) WHERE b IS NOT NULL;
CREATE TABLE T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15) NOT NULL,
  C DOUBLE PRECISION
);
INSERT INTO T VALUES ('a', 'p', -1.7976931348623157e+308);
INSERT INTO T VALUES ('b', 'q', -0.000000001);
INSERT INTO T VALUES ('c', 'r', 0.0);
INSERT INTO T VALUES ('d', 's', 3.14159265358979);
INSERT INTO T VALUES ('e', 't', 1.7976931348623157e+308);
INSERT INTO T VALUES ('f', 't', 750.25);
SELECT B, AVG(C) AS D, MIN(C) AS E, MAX(C) AS F FROM T GROUP BY B;
INSERT OR IGNORE INTO t1 VALUES ('', '', NULL, 'x');
ALTER TABLE T ADD COLUMN extra_5980 NATIVE CHARACTER(70)NVARCHAR(100) DEFAULT (random());
WITH n AS NOT MATERIALIZED (SELECT * FROM t1) SELECT * FROM n WHERE a > 0;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7823 AS SELECT B FROM T;
INSERT OR IGNORE INTO T VALUES ('', 0, 0);
.quit
PRAGMA trusted_schema;
.system echo "mwahaha i am root"
BEGIN EXCLUSIVE;
.imposter off
ATTACH DATABASE ':memory:' AS aux0;
CREATE TABLE T (
  a INTEGER,
  b REAL,
  c REAL
);
INSERT INTO T VALUES (cos(unistr_quote(CAST(log(length('你好'), hex(123.456)) AS NONE))),1.5,10.0), (2,-2.5,20.0), (3,-9e999,30.0);
SELECT * FROM T WHERE b < 2.0 ORDER BY b;
PRAGMA secure_delete = NO;
CREATE TABLE main.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
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
DETACH DATABASE aux0;
WITH cte AS (SELECT b, COUNT(*) FROM T GROUP BY b) SELECT * FROM cte;
CREATE  INDEX IF NOT EXISTS idx_t1_2751 ON t1(lower(b));
COMMIT TRANSACTION;
DELETE FROM t1 WHERE c IS NULL;
SELECT * FROM T AS a INNER JOIN T AS b ON a.rowid = b.rowid;
SELECT PERCENT_RANK() OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT * FROM t1 AS a RIGHT JOIN T AS b ON a.rowid = b.rowid;
SELECT * FROM t1 t1 RIGHT JOIN t1 t2 ON t1.c = (SELECT c FROM t1 WHERE c = t1.c);
SELECT MAX(c) OVER (PARTITION BY c ORDER BY c GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
ALTER TABLE T RENAME COLUMN a TO a_r7648;
CREATE  INDEX IF NOT EXISTS idx_T_3011 ON T(lower(b)) WHERE b IS NOT NULL;
CREATE TABLE T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15) NOT NULL,
  C DOUBLE PRECISION
);
INSERT INTO T VALUES ('a', 'p', -1.7976931348623157e+308);
INSERT INTO T VALUES ('b', 'q', -0.000000001);
INSERT INTO T VALUES ('c', 'r', 0.0);
INSERT INTO T VALUES ('d', 's', 3.14159265358979);
INSERT INTO T VALUES ('e', 't', 1.7976931348623157e+308);
INSERT INTO T VALUES ('f', 't', 750.25);
SELECT B, AVG(C) AS D, MIN(C) AS E, MAX(C) AS F FROM T GROUP BY B;
INSERT OR IGNORE INTO t1 VALUES ('', '', NULL, 'x');
ALTER TABLE T ADD COLUMN extra_5980 NATIVE CHARACTER(70)NVARCHAR(100) DEFAULT (random());
WITH n AS NOT MATERIALIZED (SELECT * FROM t1) SELECT * FROM n WHERE a > 0;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7823 AS SELECT B FROM T;
INSERT OR IGNORE INTO T VALUES ('', 0, 0);
.quit
PRAGMA trusted_schema;
.system echo "mwahaha i am root"
BEGIN EXCLUSIVE;
.imposter off
ATTACH DATABASE ':memory:' AS aux0;
CREATE TABLE T (
  a INTEGER,
  b REAL,
  c REAL
);
INSERT INTO T VALUES (cos(unistr_quote(CAST(log(length('你好'), hex(123.456)) AS NONE))),1.5,10.0), (2,-2.5,20.0), (3,-9e999,30.0);
SELECT * FROM T WHERE b < 2.0 ORDER BY b;
PRAGMA secure_delete = NO;
CREATE TABLE main.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
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
DETACH DATABASE aux0;
WITH cte AS (SELECT b, COUNT(*) FROM T GROUP BY b) SELECT * FROM cte;
CREATE  INDEX IF NOT EXISTS idx_t1_2751 ON t1(lower(b));
COMMIT TRANSACTION;
DELETE FROM t1 WHERE c IS NULL;
SELECT * FROM T AS a INNER JOIN T AS b ON a.rowid = b.rowid;
SELECT PERCENT_RANK() OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT * FROM t1 AS a RIGHT JOIN T AS b ON a.rowid = b.rowid;
SELECT * FROM t1 t1 RIGHT JOIN t1 t2 ON t1.c = (SELECT c FROM t1 WHERE c = t1.c);
SELECT MAX(c) OVER (PARTITION BY c ORDER BY c GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
ALTER TABLE T RENAME COLUMN a TO a_r7648;
CREATE  INDEX IF NOT EXISTS idx_T_3011 ON T(lower(b)) WHERE b IS NOT NULL;
CREATE TABLE T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15) NOT NULL,
  C DOUBLE PRECISION
);
INSERT INTO T VALUES ('a', 'p', -1.7976931348623157e+308);
INSERT INTO T VALUES ('b', 'q', -0.000000001);
INSERT INTO T VALUES ('c', 'r', 0.0);
INSERT INTO T VALUES ('d', 's', 3.14159265358979);
INSERT INTO T VALUES ('e', 't', 1.7976931348623157e+308);
INSERT INTO T VALUES ('f', 't', 750.25);
SELECT B, AVG(C) AS D, MIN(C) AS E, MAX(C) AS F FROM T GROUP BY B;
INSERT OR IGNORE INTO t1 VALUES ('', '', NULL, 'x');
ALTER TABLE T ADD COLUMN extra_5980 NATIVE CHARACTER(70)NVARCHAR(100) DEFAULT (random());
WITH n AS NOT MATERIALIZED (SELECT * FROM t1) SELECT * FROM n WHERE a > 0;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7823 AS SELECT B FROM T;
INSERT OR IGNORE INTO T VALUES ('', 0, 0);

SELECT GROUP_CONCAT(d, '.') FILTER (WHERE d IS NOT NULL) OVER (PARTITION BY d ORDER BY d ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM t1;
INSERT OR ABORT INTO T VALUES (0, 0, '');
CREATE TRIGGER IF NOT EXISTS trg_T_8373 AFTER DELETE ON T FOR EACH ROW BEGIN INSERT INTO T(C) VALUES (NULL); END;
ALTER TABLE t1 ADD COLUMN extra_6092 SMALLINT DEFAULT '';
INSERT INTO t1 VALUES (NULL, NULL, 'x', 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
ALTER TABLE T RENAME COLUMN B TO B_r2237;
DELETE FROM t1 WHERE 1 RETURNING *;
SELECT STRING_AGG(b, '|') FROM t1;

SELECT COUNT(*) FROM t1;
SELECT * FROM t1 WHERE c IN (SELECT c FROM t1 WHERE 1/0 = 0);SELECT * FROM t1 WHERE c IN (SELECT c FROM t1 LIMIT -1);
PRAGMA wal_autocheckpoint = 1000;
ALTER TABLE t1 DROP COLUMN d;
DETACH DATABASE aux73;
CREATE TEMP  VIEW IF NOT EXISTS v_T_6642 AS SELECT A FROM T;
SELECT LAG(C, 0, 'default') OVER (ORDER BY C GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
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
```

