## 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
SAVEPOINT sp1689;
PRAGMA quick_check(20);
SAVEPOINT sp5011;
ATTACH DATABASE ':memory:' AS aux26;
SAVEPOINT sp3272;
PRAGMA ignore_check_constraints = NO;
.eqp off
PRAGMA count_changes = '|';
ATTACH DATABASE ':memory:' AS aux96;
ATTACH DATABASE ':memory:' AS aux34;
CREATE TEMPORARY TABLE t0(x, y, z);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (CAST(unicode('你好') AS MEDIUMINT), 'Wernher', if(min(-x'b48568f4c83863c45d', '2', 3), 10, 0, 10, 0, 10, 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
SELECT -99999999999999999999999999999999999999999999999999;
SELECT * FROM sqlite_temp_master WHERE NOT NOT (sql GLOB '000[]***') ;
DROP TABLE t0;
REINDEX;
DELETE FROM t0 WHERE 1 RETURNING *;
UPDATE t0 SET z = '' WHERE z BETWEEN 0 AND 100;
SELECT * FROM t0 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
SELECT * FROM t1 WHERE b NOT IN (SELECT b FROM t1);
DETACH DATABASE aux34;
SELECT * FROM t1 AS a FULL OUTER JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r5353;
ALTER TABLE t1 RENAME TO t1_r3388;
PRAGMA short_column_names = YES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);

SELECT COUNT(*) FROM t1;
CREATE TRIGGER IF NOT EXISTS trg_t0_3641 AFTER UPDATE ON t0 BEGIN SELECT RAISE(IGNORE); 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 t1;
DETACH DATABASE aux96;
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
WITH RECURSIVE multi(a, b) AS (VALUES(1, 1.0) UNION ALL SELECT a+1, b*0.5 FROM multi WHERE a<38) SELECT * FROM multi;
.eqp off
PRAGMA count_changes = '|';
ATTACH DATABASE ':memory:' AS aux96;
ATTACH DATABASE ':memory:' AS aux34;
CREATE TEMPORARY TABLE t0(x, y, z);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (CAST(unicode('你好') AS MEDIUMINT), '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
SELECT -99999999999999999999999999999999999999999999999999;
SELECT * FROM sqlite_temp_master WHERE sql GLOB '000[]***';
DROP TABLE t0;
REINDEX;
DELETE FROM t0 WHERE 1 RETURNING *;
UPDATE t0 SET z = '' WHERE z BETWEEN 0 AND 100;
SELECT * FROM t0 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
SELECT * FROM t1 WHERE b NOT IN (SELECT b FROM t1);
DETACH DATABASE aux34;
SELECT * FROM t1 AS a FULL OUTER JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r5353;
ALTER TABLE t1 RENAME TO t1_r3388;
PRAGMA short_column_names = YES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);

SELECT COUNT(*) FROM t1;
CREATE TRIGGER IF NOT EXISTS trg_t0_3641 AFTER UPDATE ON t0 BEGIN SELECT RAISE(IGNORE); 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 t1;
DETACH DATABASE aux96;
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
WITH RECURSIVE multi(a, b) AS (VALUES(1, 1.0) UNION ALL SELECT a+1, b*0.5 FROM multi WHERE a<38) SELECT * FROM multi;
.eqp off
PRAGMA count_changes = '|';
ATTACH DATABASE ':memory:' AS aux96;
ATTACH DATABASE ':memory:' AS aux34;
CREATE TEMPORARY TABLE t0(x, y, z);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (CAST(unicode('你好') AS MEDIUMINT), '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
SELECT -99999999999999999999999999999999999999999999999999;
SELECT * FROM sqlite_temp_master WHERE sql GLOB '000[]***';
DROP TABLE t0;
REINDEX;
DELETE FROM t0 WHERE 1 RETURNING *;
UPDATE t0 SET z = '' WHERE z BETWEEN 0 AND 100;
SELECT * FROM t0 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
SELECT * FROM t1 WHERE b NOT IN (SELECT b FROM t1);
DETACH DATABASE aux34;
SELECT * FROM t1 AS a FULL OUTER JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r5353;
ALTER TABLE t1 RENAME TO t1_r3388;
PRAGMA short_column_names = YES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);

SELECT COUNT(*) FROM t1;
CREATE TRIGGER IF NOT EXISTS trg_t0_3641 AFTER UPDATE ON t0 BEGIN SELECT RAISE(IGNORE); 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 t1;
DETACH DATABASE aux96;
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
WITH RECURSIVE multi(a, b) AS (VALUES(1, 1.0) UNION ALL SELECT a+1, b*0.5 FROM multi WHERE a<38) SELECT * FROM multi;
.eqp off
PRAGMA count_changes = '|';
ATTACH DATABASE ':memory:' AS aux96;
ATTACH DATABASE ':memory:' AS aux34;
CREATE TEMPORARY TABLE t0(x, y, z);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (CAST(unicode('你好') AS MEDIUMINT), '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
SELECT -99999999999999999999999999999999999999999999999999;
SELECT * FROM sqlite_temp_master WHERE sql GLOB '000[]***';
DROP TABLE t0;
REINDEX;
DELETE FROM t0 WHERE 1 RETURNING *;
UPDATE t0 SET z = '' WHERE z BETWEEN 0 AND 100;
SELECT * FROM t0 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
SELECT * FROM t1 WHERE b NOT IN (SELECT b FROM t1);
DETACH DATABASE aux34;
SELECT * FROM t1 AS a FULL OUTER JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r5353;
ALTER TABLE t1 RENAME TO t1_r3388;
PRAGMA short_column_names = YES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);

SELECT COUNT(*) FROM t1;
CREATE TRIGGER IF NOT EXISTS trg_t0_3641 AFTER UPDATE ON t0 BEGIN SELECT RAISE(IGNORE); 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 t1;
DETACH DATABASE aux96;
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
WITH RECURSIVE multi(a, b) AS (VALUES(1, 1.0) UNION ALL SELECT a+1, b*0.5 FROM multi WHERE a<38) SELECT * FROM multi;
.eqp off
PRAGMA count_changes = '|';
ATTACH DATABASE ':memory:' AS aux96;
ATTACH DATABASE ':memory:' AS aux34;
CREATE TEMPORARY TABLE t0(x, y, z);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (CAST(unicode('你好') AS MEDIUMINT), '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
SELECT -99999999999999999999999999999999999999999999999999;
SELECT * FROM sqlite_temp_master WHERE sql GLOB '000[]***';
DROP TABLE t0;
REINDEX;
DELETE FROM t0 WHERE 1 RETURNING *;
UPDATE t0 SET z = '' WHERE z BETWEEN 0 AND 100;
SELECT * FROM t0 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
SELECT * FROM t1 WHERE b NOT IN (SELECT b FROM t1);
DETACH DATABASE aux34;
SELECT * FROM t1 AS a FULL OUTER JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r5353;
ALTER TABLE t1 RENAME TO t1_r3388;
PRAGMA short_column_names = YES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);

SELECT COUNT(*) FROM t1;
CREATE TRIGGER IF NOT EXISTS trg_t0_3641 AFTER UPDATE ON t0 BEGIN SELECT RAISE(IGNORE); 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 t1;
DETACH DATABASE aux96;
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
WITH RECURSIVE multi(a, b) AS (VALUES(1, 1.0) UNION ALL SELECT a+1, b*0.5 FROM multi WHERE a<38) SELECT * FROM multi;
.eqp off
PRAGMA count_changes = '|';
ATTACH DATABASE ':memory:' AS aux96;
ATTACH DATABASE ':memory:' AS aux34;
CREATE TEMPORARY TABLE t0(x, y, z);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (CAST(unicode('你好') AS MEDIUMINT), '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
SELECT -99999999999999999999999999999999999999999999999999;
SELECT * FROM sqlite_temp_master WHERE sql GLOB '000[]***';
DROP TABLE t0;
REINDEX;
DELETE FROM t0 WHERE 1 RETURNING *;
UPDATE t0 SET z = '' WHERE z BETWEEN 0 AND 100;
SELECT * FROM t0 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
SELECT * FROM t1 WHERE b NOT IN (SELECT b FROM t1);
DETACH DATABASE aux34;
SELECT * FROM t1 AS a FULL OUTER JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r5353;
ALTER TABLE t1 RENAME TO t1_r3388;
PRAGMA short_column_names = YES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);

SELECT COUNT(*) FROM t1;
CREATE TRIGGER IF NOT EXISTS trg_t0_3641 AFTER UPDATE ON t0 BEGIN SELECT RAISE(IGNORE); 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 t1;
DETACH DATABASE aux96;
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
WITH RECURSIVE multi(a, b) AS (VALUES(1, 1.0) UNION ALL SELECT a+1, b*0.5 FROM multi WHERE a<38) SELECT * FROM multi;
.eqp off
PRAGMA count_changes = '|';
ATTACH DATABASE ':memory:' AS aux96;
ATTACH DATABASE ':memory:' AS aux34;
CREATE TEMPORARY TABLE t0(x, y, z);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (CAST(unicode('你好') AS MEDIUMINT), '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
SELECT -99999999999999999999999999999999999999999999999999;
SELECT * FROM sqlite_temp_master WHERE sql GLOB '000[]***';
DROP TABLE t0;
REINDEX;
DELETE FROM t0 WHERE 1 RETURNING *;
UPDATE t0 SET z = '' WHERE z BETWEEN 0 AND 100;
SELECT * FROM t0 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
SELECT * FROM t1 WHERE b NOT IN (SELECT b FROM t1);
DETACH DATABASE aux34;
SELECT * FROM t1 AS a FULL OUTER JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r5353;
ALTER TABLE t1 RENAME TO t1_r3388;
PRAGMA short_column_names = YES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);

SELECT COUNT(*) FROM t1;
CREATE TRIGGER IF NOT EXISTS trg_t0_3641 AFTER UPDATE ON t0 BEGIN SELECT RAISE(IGNORE); 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 t1;
DETACH DATABASE aux96;
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
WITH RECURSIVE multi(a, b) AS (VALUES(1, 1.0) UNION ALL SELECT a+1, b*0.5 FROM multi WHERE a<38) SELECT * FROM multi;

VACUUM main;
CREATE  INDEX IF NOT EXISTS idx_t1_5312 ON t1(d) WHERE d > 0;
PRAGMA empty_result_callbacks = ON;
REINDEX t0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t0_7893 ON t0(lower(x)) WHERE x > 0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_2600 ON t1(b) WHERE b > 0;
ALTER TABLE t0 RENAME COLUMN z TO z_r9903;
ROLLBACK TO sp3272;
RELEASE sp3272;
SELECT * FROM t1 WHERE c IN (SELECT c FROM t1 LIMIT 0);
VACUUM;
SELECT SUM(y) FILTER (WHERE 1=0) OVER (ORDER BY y RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t0;
VACUUM main;
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;
CREATE  INDEX IF NOT EXISTS idx_T_3768 ON T(lower(B));
DELETE FROM T WHERE 0;
CREATE TRIGGER IF NOT EXISTS trg_T_6223 BEFORE UPDATE ON T BEGIN INSERT INTO T(B) VALUES (NULL); END;
PRAGMA integrity_check;
INSERT INTO t1 VALUES ('x', 'x', 'x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
DETACH DATABASE aux26;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_2309 ON t1(lower(c)) WHERE c > 0;
ANALYZE;
ALTER TABLE T DROP COLUMN A;
RELEASE sp5011;
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;
REINDEX;
CREATE TRIGGER IF NOT EXISTS trg_T_9509 AFTER UPDATE OF B ON T FOR EACH ROW BEGIN SELECT RAISE(IGNORE); END;
SAVEPOINT sp5011;
ATTACH DATABASE ':memory:' AS aux26;
SAVEPOINT sp3272;
PRAGMA ignore_check_constraints = NO;
.eqp off
PRAGMA count_changes = '|';
ATTACH DATABASE ':memory:' AS aux96;
ATTACH DATABASE ':memory:' AS aux34;
CREATE TEMPORARY TABLE t0(x, y, z);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (CAST(unicode('你好') AS MEDIUMINT), 'Wernher', if(min(-9223372036854775809, '2', 3), 10, 0, 10, 0, 10, 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
SELECT -99999999999999999999999999999999999999999999999999;
SELECT * FROM sqlite_temp_master WHERE sql GLOB '000[]***';
DROP TABLE t0;
REINDEX;
DELETE FROM t0 WHERE 1 RETURNING *;
UPDATE t0 SET z = '' WHERE z BETWEEN 0 AND 100;
SELECT * FROM t0 AS a FULL OUTER joIN t1 AS b ON a.rowid = b.rowid;
SELECT * FROM t1 WHERE b NOT IN (SELECT b FROM t1);
DETACH DATABASE aux34;
SELECT * FROM t1 AS a FULL OUTER JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r5353;
ALTER TABLE t1 RENAME TO t1_r3388;
PRAGMA short_column_names = YES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);

SELECT COUNT(*) FROM t1;
CREATE TRIGGER IF NOT EXISTS trg_t0_3641 AFTER UPDATE ON t0 BEGIN SELECT RAISE(IGNORE); 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 t1;
DETACH DATABASE aux96;
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
WITH RECURSIVE multi(a, b) AS (VALUES(1, 1.0) UNION ALL SELECT a+1, b*0.5 FROM multi WHERE a<38) SELECT * FROM multi;
.eqp off
PRAGMA count_changes = '|';
ATTACH DATABASE ':memory:' AS aux96;
ATTACH DATABASE ':memory:' AS aux34;
CREATE TEMPORARY TABLE t0(x, y, z);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (CAST(unicode('你好') AS MEDIUMINT), '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
SELECT -99999999999999999999999999999999999999999999999999;
SELECT * FROM sqlite_temp_master WHERE sql GLOB '000[]***';
DROP TABLE t0;
REINDEX;
DELETE FROM t0 WHERE 1 RETURNING *;
UPDATE t0 SET z = '' WHERE z BETWEEN 0 AND 100;
SELECT * FROM t0 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
SELECT * FROM t1 WHERE b NOT IN (SELECT b FROM t1);
DETACH DATABASE aux34;
SELECT * FROM t1 AS a FULL OUTER JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r5353;
ALTER TABLE t1 RENAME TO t1_r3388;
PRAGMA short_column_names = YES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);

SELECT COUNT(*) FROM t1;
CREATE TRIGGER IF NOT EXISTS trg_t0_3641 AFTER UPDATE ON t0 BEGIN SELECT RAISE(IGNORE); 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 t1;
DETACH DATABASE aux96;
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
WITH RECURSIVE multi(a, b) AS (VALUES(1, 1.0) UNION ALL SELECT a+1, b*0.5 FROM multi WHERE a<38) SELECT * FROM multi;
.eqp off
PRAGMA count_changes = '|';
ATTACH DATABASE ':memory:' AS aux96;
ATTACH DATABASE ':memory:' AS aux34;
CREATE TEMPORARY TABLE t0(x, y, z);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (CAST(unicode('你好') AS MEDIUMINT), '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
SELECT -99999999999999999999999999999999999999999999999999;
SELECT * FROM sqlite_temp_master WHERE sql GLOB '000[]***';
DROP TABLE t0;
REINDEX;
DELETE FROM t0 WHERE 1 RETURNING *;
UPDATE t0 SET z = '' WHERE z BETWEEN 0 AND 100;
SELECT * FROM t0 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
SELECT * FROM t1 WHERE b NOT IN (SELECT b FROM t1);
DETACH DATABASE aux34;
SELECT * FROM t1 AS a FULL OUTER JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r5353;
ALTER TABLE t1 RENAME TO t1_r3388;
PRAGMA short_column_names = YES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);

SELECT COUNT(*) FROM t1;
CREATE TRIGGER IF NOT EXISTS trg_t0_3641 AFTER UPDATE ON t0 BEGIN SELECT RAISE(IGNORE); 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 t1;
DETACH DATABASE aux96;
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
WITH RECURSIVE multi(a, b) AS (VALUES(1, 1.0) UNION ALL SELECT a+1, b*0.5 FROM multi WHERE a<38) SELECT * FROM multi;
.eqp off
PRAGMA count_changes = '|';
ATTACH DATABASE ':memory:' AS aux96;
ATTACH DATABASE ':memory:' AS aux34;
CREATE TEMPORARY TABLE t0(x, y, z);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (CAST(unicode('你好') AS MEDIUMINT), '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
SELECT -99999999999999999999999999999999999999999999999999;
SELECT * FROM sqlite_temp_master WHERE sql GLOB '000[]***';
DROP TABLE t0;
REINDEX;
DELETE FROM t0 WHERE 1 RETURNING *;
UPDATE t0 SET z = '' WHERE z BETWEEN 0 AND 100;
SELECT * FROM t0 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
SELECT * FROM t1 WHERE b NOT IN (SELECT b FROM t1);
DETACH DATABASE aux34;
SELECT * FROM t1 AS a FULL OUTER JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r5353;
ALTER TABLE t1 RENAME TO t1_r3388;
PRAGMA short_column_names = YES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);

SELECT COUNT(*) FROM t1;
CREATE TRIGGER IF NOT EXISTS trg_t0_3641 AFTER UPDATE ON t0 BEGIN SELECT RAISE(IGNORE); 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 t1;
DETACH DATABASE aux96;
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
WITH RECURSIVE multi(a, b) AS (VALUES(1, 1.0) UNION ALL SELECT a+1, b*0.5 FROM multi WHERE a<38) SELECT * FROM multi;
.eqp off
PRAGMA count_changes = '|';
ATTACH DATABASE ':memory:' AS aux96;
ATTACH DATABASE ':memory:' AS aux34;
CREATE TEMPORARY TABLE t0(x, y, z);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (CAST(unicode('你好') AS MEDIUMINT), '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
SELECT -99999999999999999999999999999999999999999999999999;
SELECT * FROM sqlite_temp_master WHERE sql GLOB '000[]***';
DROP TABLE t0;
REINDEX;
DELETE FROM t0 WHERE 1 RETURNING *;
UPDATE t0 SET z = '' WHERE z BETWEEN 0 AND 100;
SELECT * FROM t0 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
SELECT * FROM t1 WHERE b NOT IN (SELECT b FROM t1);
DETACH DATABASE aux34;
SELECT * FROM t1 AS a FULL OUTER JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r5353;
ALTER TABLE t1 RENAME TO t1_r3388;
PRAGMA short_column_names = YES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);

SELECT COUNT(*) FROM t1;
CREATE TRIGGER IF NOT EXISTS trg_t0_3641 AFTER UPDATE ON t0 BEGIN SELECT RAISE(IGNORE); 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 t1;
DETACH DATABASE aux96;
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
WITH RECURSIVE multi(a, b) AS (VALUES(1, 1.0) UNION ALL SELECT a+1, b*0.5 FROM multi WHERE a<38) SELECT * FROM multi;
.eqp off
PRAGMA count_changes = '|';
ATTACH DATABASE ':memory:' AS aux96;
ATTACH DATABASE ':memory:' AS aux34;
CREATE TEMPORARY TABLE t0(x, y, z);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (CAST(unicode('你好') AS MEDIUMINT), '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
SELECT -99999999999999999999999999999999999999999999999999;
SELECT * FROM sqlite_temp_master WHERE sql GLOB '000[]***';
DROP TABLE t0;
REINDEX;
DELETE FROM t0 WHERE 1 RETURNING *;
UPDATE t0 SET z = '' WHERE z BETWEEN 0 AND 100;
SELECT * FROM t0 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
SELECT * FROM t1 WHERE b NOT IN (SELECT b FROM t1);
DETACH DATABASE aux34;
SELECT * FROM t1 AS a FULL OUTER JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r5353;
ALTER TABLE t1 RENAME TO t1_r3388;
PRAGMA short_column_names = YES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);

SELECT COUNT(*) FROM t1;
CREATE TRIGGER IF NOT EXISTS trg_t0_3641 AFTER UPDATE ON t0 BEGIN SELECT RAISE(IGNORE); 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 t1;
DETACH DATABASE aux96;
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
WITH RECURSIVE multi(a, b) AS (VALUES(1, 1.0) UNION ALL SELECT a+1, b*0.5 FROM multi WHERE a<38) SELECT * FROM multi;
.eqp off
PRAGMA count_changes = '|';
ATTACH DATABASE ':memory:' AS aux96;
ATTACH DATABASE ':memory:' AS aux34;
CREATE TEMPORARY TABLE t0(x, y, z);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (CAST(unicode('你好') AS MEDIUMINT), '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
SELECT -99999999999999999999999999999999999999999999999999;
SELECT * FROM sqlite_temp_master WHERE sql GLOB '000[]***';
DROP TABLE t0;
REINDEX;
DELETE FROM t0 WHERE 1 RETURNING *;
UPDATE t0 SET z = '' WHERE z BETWEEN 0 AND 100;
SELECT * FROM t0 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
SELECT * FROM t1 WHERE b NOT IN (SELECT b FROM t1);
DETACH DATABASE aux34;
SELECT * FROM t1 AS a FULL OUTER JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r5353;
ALTER TABLE t1 RENAME TO t1_r3388;
PRAGMA short_column_names = YES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);

SELECT COUNT(*) FROM t1;
CREATE TRIGGER IF NOT EXISTS trg_t0_3641 AFTER UPDATE ON t0 BEGIN SELECT RAISE(IGNORE); 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 t1;
DETACH DATABASE aux96;
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
WITH RECURSIVE multi(a, b) AS (VALUES(1, 1.0) UNION ALL SELECT a+1, b*0.5 FROM multi WHERE a<38) SELECT * FROM multi;

VACUUM main;
CREATE  INDEX IF NOT EXISTS idx_t1_5312 ON t1(d) WHERE d > 0;
PRAGMA empty_result_callbacks = ON;
REINDEX t0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t0_7893 ON t0(lower(x)) WHERE x > 0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_2600 ON t1(b) WHERE b > 0;
ALTER TABLE t0 RENAME COLUMN z TO z_r9903;
ROLLBACK TO sp3272;
RELEASE sp3272;
SELECT * FROM t1 WHERE c IN (SELECT c FROM t1 LIMIT 0);
VACUUM;
SELECT SUM(y) FILTER (WHERE 1=0) OVER (ORDER BY y RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t0;
VACUUM main;
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;
CREATE  INDEX IF NOT EXISTS idx_T_3768 ON T(lower(B));
DELETE FROM T WHERE 0;
CREATE TRIGGER IF NOT EXISTS trg_T_6223 BEFORE UPDATE ON T BEGIN INSERT INTO T(B) VALUES (NULL); END;
PRAGMA integrity_check;
INSERT INTO t1 VALUES ('x', 'x', 'x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
DETACH DATABASE aux26;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_2309 ON t1(lower(c)) WHERE c > 0;
ANALYZE;
ALTER TABLE T DROP COLUMN A;
RELEASE sp5011;
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;
REINDEX;
CREATE TRIGGER IF NOT EXISTS trg_T_9509 AFTER UPDATE OF B ON T FOR EACH ROW BEGIN SELECT RAISE(IGNORE); END;

VACUUM;
DROP TRIGGER IF EXISTS T;

SELECT COUNT(*) FROM T;
SELECT * FROM T;
UPDATE t1 SET b = -83 WHERE b IS NOT NULL RETURNING *;
INSERT OR FAIL INTO t0 VALUES ('', 3, 0);
RELEASE sp1689;
SELECT COUNT(*) FILTER (WHERE y IS NOT NULL), SUM(rowid) FILTER (WHERE y > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(y) FILTER (WHERE y > 0 AND y < 100), COUNT(*) FILTER (WHERE typeof(y) = "text") FROM t0;
```

## Actual output

```sql
ok
CREATE TABLE "t2"("b","c","_ROWID_",PRIMARY KEY("b","c","_ROWID_"))WITHOUT ROWID;
WARNING: writing to an imposter table will corrupt the "t1bc" index!
Braun|30|3
von|20|2
Braun|30
von|20
```

## Expectation

```sql

```

## Flag

```

```

