## 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 aux95;
CREATE TABLE T (
  a INTEGER,
  b REAL
);
INSERT INTO T VALUES (abs(123.456),1.5), (2,-7.25), (3,0.0);
SELECT a,b FROM T WHERE a >= 2 ORDER BY b;
PRAGMA journal_mode = 'OFF';
PRAGMA fullsync = OFF;
-- -nullvalue "NU11"

BEGIN;
.version
PRAGMA cache_spill = YES;
.stats vmstep
.changes off
.bail on
PRAGMA wal_checkpoint('NOOP');
PRAGMA cache_spill = YES;
PRAGMA foreign_key_check;
.exit -'𠜎'
CREATE TABLE IF NOT EXISTS photo(pk integer primary key, x);
CREATE TABLE IF NOT EXISTS tag(pk integer primary key, fk int, name);
SELECT P.pk from PHOTO P WHERE NOT EXISTS ( SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk EXCEPT SELECT T3.pk from TAG T3 WHERE T3.fk = P.pk AND T3.name LIKE '%foo%');
INSERT INTO photo VALUES(likely(CAST(max(log2(cosh(--(-(5239146445031386448)))), 1, 2, 3) AS BLOB)),1);
INSERT INTO photo VALUES(concat_ws('|', 'a', 'b', 'c'),NULL);
INSERT INTO photo VALUES(sign('abc'),3);
INSERT INTO tag VALUES(11,1,'one');
INSERT INTO tag VALUES(12,1,'two');
INSERT INTO tag VALUES(21,1,'one-b');
SELECT P.pk from PHOTO P WHERE NOT EXISTS (SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk EXCEPT SELECT T3.pk from TAG T3 WHERE T3.fk = P.pk AND T3.name LIKE '%foo%');
WITH a AS (SELECT * FROM tag), b AS (SELECT * FROM a), c AS (SELECT * FROM b), d AS (SELECT * FROM c) SELECT * FROM d;
UPDATE photo SET pk = pk + 1 WHERE 1;
SELECT COUNT(*) FROM photo;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
DROP INDEX IF EXISTS photo;
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;
ALTER TABLE T RENAME TO T_r4441;
WITH cte AS (SELECT pk, /* PRAGMA fullsync = NO; */ SUM(pk) AS total FROM photo GROUP BY pk) SELECT * FROM cte ORDER BY total DESC;
VACUUM;
ALTER TABLE T RENAME TO T_r7105;
DelETe FROM photo WHERE 0;
SELECT COUNT(*) FILTER (WHERE name IS NOT NULL), SUM(rowid) FILTER (WHERE name > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(name) FILTER (WHERE name > 0 AND name < 100), COUNT(*) FILTER (WHERE typeof(name) = "text") FROM tag;
INSERT OR FAIL INTO tag VALUES ('', -1, -2);
ALTER TABLE photo ADD COLUMN extra_3529 NUMERIC DEFAULT 0;
INSERT OR IGNORE INTO tag VALUES (7, 10, NULL);
REINDEX tag;
REINDEX tag;
CREATE TRIGGER IF NOT EXISTS trg_tag_409 AFTER INSERT ON tag FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
WITH a AS (SELECT * FROM T WHERE C IS NOT NULL), b AS (SELECT * FROM a WHERE C > 0), c AS (SELECT * FROM b LIMIT 10) SELECT * FROM c;
VACUUM main;
.version
PRAGMA cache_spill = YES;
.stats vmstep
.changes off
.bail on
PRAGMA wal_checkpoint('NOOP');
PRAGMA cache_spill = YES;
PRAGMA foreign_key_check;
.exit -'𠜎'
CREATE TABLE IF NOT EXISTS photo(pk integer primary key, x);
CREATE TABLE IF NOT EXISTS tag(pk integer primary key, fk int, name);
SELECT P.pk from PHOTO P WHERE NOT EXISTS ( SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk EXCEPT SELECT T3.pk from TAG T3 WHERE T3.fk = P.pk AND T3.name LIKE '%foo%');
INSERT INTO photo VALUES(likely(CAST(max(log2(2.2250738585072014e-308), 1, 2, 3) AS BLOB)),1);
INSERT INTO photo VALUES(2,2);
INSERT INTO photo VALUES(3,3);
INSERT INTO tag VALUES(11,1,'one');
INSERT INTO tag VALUES(12,1,'two');
INSERT INTO tag VALUES(21,1,'one-b');
SELECT P.pk from PHOTO P WHERE NOT EXISTS (SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk EXCEPT SELECT T3.pk from TAG T3 WHERE T3.fk = P.pk AND T3.name LIKE '%foo%');
WITH a AS (SELECT * FROM tag), b AS (SELECT * FROM a), c AS (SELECT * FROM b), d AS (SELECT * FROM c) SELECT * FROM d;
UPDATE photo SET pk = pk + 1 WHERE 1;
SELECT COUNT(*) FROM photo;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
DROP INDEX IF EXISTS photo;
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;
ALTER TABLE T RENAME TO T_r4441;
WITH cte AS (SELECT pk, /* PRAGMA fullsync = NO; */ SUM(pk) AS total FROM photo GROUP BY pk) SELECT * FROM cte ORDER BY total DESC;
VACUUM;
ALTER TABLE T RENAME TO T_r7105;
DELETE FROM photo WHERE 0;
SELECT COUNT(*) FILTER (WHERE name IS NOT NULL), SUM(rowid) FILTER (WHERE name > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(name) FILTER (WHERE name > 0 AND name < 100), COUNT(*) FILTER (WHERE typeof(name) = "text") FROM tag;
INSERT OR FAIL INTO tag VALUES ('', -1, -2);
ALTER TABLE photo ADD COLUMN extra_3529 NUMERIC DEFAULT 0;
INSERT OR IGNORE INTO tag VALUES (7, 10, NULL);
REINDEX tag;
REINDEX tag;
CREATE TRIGGER IF NOT EXISTS trg_tag_409 AFTER INSERT ON tag FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
WITH a AS (SELECT * FROM T WHERE C IS NOT NULL), b AS (SELECT * FROM a WHERE C > 0), c AS (SELECT * FROM b LIMIT 10) SELECT * FROM c;
VACUUM main;
.version
PRAGMA cache_spill = YES;
.stats vmstep
.changes off
.bail on
PRAGMA wal_checkpoint('NOOP');
PRAGMA cache_spill = YES;
PRAGMA foreign_key_check;
.exit -'𠜎'
CREATE TABLE IF NOT EXISTS photo(pk integer primary key, x);
CREATE TABLE IF NOT EXISTS tag(pk integer primary key, fk int, name);
SELECT P.pk from PHOTO P WHERE NOT EXISTS ( SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk EXCEPT SELECT T3.pk from TAG T3 WHERE T3.fk = P.pk AND T3.name LIKE '%foo%');
INSERT INTO photo VALUES(likely(CAST(max(log2(2.2250738585072014e-308), 1, 2, 3) AS BLOB)),1);
INSERT INTO photo VALUES(2,2);
INSERT INTO photo VALUES(3,3);
INSERT INTO tag VALUES(11,1,'one');
INSERT INTO tag VALUES(12,1,'two');
INSERT INTO tag VALUES(21,1,'one-b');
SELECT P.pk from PHOTO P WHERE NOT EXISTS (SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk EXCEPT SELECT T3.pk from TAG T3 WHERE T3.fk = P.pk AND T3.name LIKE '%foo%');
WITH a AS (SELECT * FROM tag), b AS (SELECT * FROM a), c AS (SELECT * FROM b), d AS (SELECT * FROM c) SELECT * FROM d;
UPDATE photo SET pk = pk + 1 WHERE 1;
SELECT COUNT(*) FROM photo;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
DROP INDEX IF EXISTS photo;
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;
ALTER TABLE T RENAME TO T_r4441;
WITH cte AS (SELECT pk, /* PRAGMA fullsync = NO; */ SUM(pk) AS total FROM photo GROUP BY pk) SELECT * FROM cte ORDER BY total DESC;
VACUUM;
ALTER TABLE T RENAME TO T_r7105;
DELETE FROM photo WHERE 0;
SELECT COUNT(*) FILTER (WHERE name IS NOT NULL), SUM(rowid) FILTER (WHERE name > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(name) FILTER (WHERE name > 0 AND name < 100), COUNT(*) FILTER (WHERE typeof(name) = "text") FROM tag;
INSERT OR FAIL INTO tag VALUES ('', -1, -2);
ALTER TABLE photo ADD COLUMN extra_3529 NUMERIC DEFAULT 0;
INSERT OR IGNORE INTO tag VALUES (7, 10, NULL);
REINDEX tag;
REINDEX tag;
CREATE TRIGGER IF NOT EXISTS trg_tag_409 AFTER INSERT ON tag FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
WITH a AS (SELECT * FROM T WHERE C IS NOT NULL), b AS (SELECT * FROM a WHERE C > 0), c AS (SELECT * FROM b LIMIT 10) SELECT * FROM c;
VACUUM main;
.version
PRAGMA cache_spill = YES;
.stats vmstep
.changes off
.bail on
PRAGMA wal_checkpoint('NOOP');
PRAGMA cache_spill = YES;
PRAGMA foreign_key_check;
.exit -'𠜎'
CREATE TABLE IF NOT EXISTS photo(pk integer primary key, x);
CREATE TABLE IF NOT EXISTS tag(pk integer primary key, fk int, name);
SELECT P.pk from PHOTO P WHERE NOT EXISTS ( SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk EXCEPT SELECT T3.pk from TAG T3 WHERE T3.fk = P.pk AND T3.name LIKE '%foo%');
INSERT INTO photo VALUES(likely(CAST(max(log2(2.2250738585072014e-308), 1, 2, 3) AS BLOB)),1);
INSERT INTO photo VALUES(2,2);
INSERT INTO photo VALUES(3,3);
INSERT INTO tag VALUES(11,1,'one');
INSERT INTO tag VALUES(12,1,'two');
INSERT INTO tag VALUES(21,1,'one-b');
SELECT P.pk from PHOTO P WHERE NOT EXISTS (SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk EXCEPT SELECT T3.pk from TAG T3 WHERE T3.fk = P.pk AND T3.name LIKE '%foo%');
WITH a AS (SELECT * FROM tag), b AS (SELECT * FROM a), c AS (SELECT * FROM b), d AS (SELECT * FROM c) SELECT * FROM d;
UPDATE photo SET pk = pk + 1 WHERE 1;
SELECT COUNT(*) FROM photo;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
DROP INDEX IF EXISTS photo;
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;
ALTER TABLE T RENAME TO T_r4441;
WITH cte AS (SELECT pk, /* PRAGMA fullsync = NO; */ SUM(pk) AS total FROM photo GROUP BY pk) SELECT * FROM cte ORDER BY total DESC;
VACUUM;
ALTER TABLE T RENAME TO T_r7105;
DELETE FROM photo WHERE 0;
SELECT COUNT(*) FILTER (WHERE name IS NOT NULL), SUM(rowid) FILTER (WHERE name > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(name) FILTER (WHERE name > 0 AND name < 100), COUNT(*) FILTER (WHERE typeof(name) = "text") FROM tag;
INSERT OR FAIL INTO tag VALUES ('', -1, -2);
ALTER TABLE photo ADD COLUMN extra_3529 NUMERIC DEFAULT 0;
INSERT OR IGNORE INTO tag VALUES (7, 10, NULL);
REINDEX tag;
REINDEX tag;
CREATE TRIGGER IF NOT EXISTS trg_tag_409 AFTER INSERT ON tag FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
WITH a AS (SELECT * FROM T WHERE C IS NOT NULL), b AS (SELECT * FROM a WHERE C > 0), c AS (SELECT * FROM b LIMIT 10) SELECT * FROM c;
VACUUM main;
.version
PRAGMA cache_spill = YES;
.stats vmstep
.changes off
.bail on
PRAGMA wal_checkpoint('NOOP');
PRAGMA cache_spill = YES;
PRAGMA foreign_key_check;
.exit -'𠜎'
CREATE TABLE IF NOT EXISTS photo(pk integer primary key, x);
CREATE TABLE IF NOT EXISTS tag(pk integer primary key, fk int, name);
SELECT P.pk from PHOTO P WHERE NOT EXISTS ( SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk EXCEPT SELECT T3.pk from TAG T3 WHERE T3.fk = P.pk AND T3.name LIKE '%foo%');
INSERT INTO photo VALUES(likely(CAST(max(log2(2.2250738585072014e-308), 1, 2, 3) AS BLOB)),1);
INSERT INTO photo VALUES(2,2);
INSERT INTO photo VALUES(3,3);
INSERT INTO tag VALUES(11,1,'one');
INSERT INTO tag VALUES(12,1,'two');
INSERT INTO tag VALUES(21,1,'one-b');
SELECT P.pk from PHOTO P WHERE NOT EXISTS (SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk EXCEPT SELECT T3.pk from TAG T3 WHERE T3.fk = P.pk AND T3.name LIKE /**/ '%foo%');
WITH a AS (SELECT * FROM tag), b AS (SELECT * FROM a), c AS (SELECT * FROM b), d AS (SELECT * FROM c) SELECT * FROM d;
UPDATE photo SET pk = pk + 1 WHERE 1;
SELECT COUNT(*) FROM photo;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
DROP INDEX IF EXISTS photo;
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;
ALTER TABLE T RENAME TO T_r4441;
WITH cte AS (SELECT pk, /* PRAGMA fullsync = NO; */ SUM(pk) AS total FROM photo GROUP BY pk) SELECT * FROM cte ORDER BY total DESC;
VACUUM;
ALTER TABLE T RENAME TO T_r7105;
DELETE FROM photo WHERE 0;
SELECT COUNT(*) FILTER (WHERE name IS NOT NULL), SUM(rowid) FILTER (WHERE name > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(name) FILTER (WHERE name > 0 AND name < 100), COUNT(*) FILTER (WHERE typeof(name) = "text") FROM tag;
INSERT OR FAIL INTO tag VALUES ('', -1, -2);
ALTER TABLE photo ADD COLUMN extra_3529 NUMERIC DEFAULT 0;
INSERT OR IGNORE INTO tag VALUES (7, 10, NULL);
REINDEX tag;
REINDEX tag;
CREATE TRIGGER IF NOT EXISTS trg_tag_409 AFTER INSERT ON tag FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
WITH a AS (SELECT * FROM T WHERE C IS NOT NULL), b AS (SELECT * FROM a WHERE C > 0), c AS (SELECT * FROM b LIMIT 10) SELECT * FROM c;
VACUUM main;
.version
PRAGMA cache_spill = YES;
.stats vmstep
.changes off
.bail on
PRAGMA wal_checkpoint('NOOP');
PRAGMA cache_spill = YES;
PRAGMA foreign_key_check;
.exit -'𠜎'
CREATE TABLE IF NOT EXISTS photo(pk integer primary key, x);
CREATE TABLE IF NOT EXISTS tag(pk integer primary key, fk int, name);
SELECT P.pk from PHOTO P WHERE NOT EXISTS ( SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk EXCEPT SELECT T3.pk from TAG T3 WHERE T3.fk = P.pk AND T3.name LIKE '%foo%');
INSERT INTO photo VALUES(likely(CAST(max(log2(2.2250738585072014e-308), 1, 2, 3) AS BLOB)),1);
INSERT INTO photo VALUES(2,2);
INSERT INTO photo VALUES(3,3);
INSERT INTO tag VALUES(11,1,'one');
INSERT INTO tag VALUES(12,1,'two');
INSERT INTO tag VALUES(21,1,'one-b');
SELECT P.pk from PHOTO P WHERE NOT EXISTS (SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk EXCEPT SELECT T3.pk from TAG T3 WHERE T3.fk = P.pk AND T3.name LIKE '%foo%');
WITH a AS (SELECT * FROM tag), b AS (SELECT * FROM a), c AS (SELECT * FROM b), d AS (SELECT * FROM c) SELECT * FROM d;
UPDATE photo SET pk = pk + 1 WHERE 1;
SELECT COUNT(*) FROM photo;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
DROP INDEX IF EXISTS photo;
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;
ALTER TABLE T RENAME TO T_r4441;
WITH cte AS (SELECT pk, /* PRAGMA fullsync = NO; */ SUM(pk) AS total FROM photo GROUP BY pk) SELECT * FROM cte ORDER BY total DESC;
VACUUM;
ALTER TABLE T RENAME TO T_r7105;
DELETE FROM photo WHERE 0;
SELECT COUNT(*) FILTER (WHERE name IS NOT NULL), SUM(rowid) FILTER (WHERE name > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(name) FILTER (WHERE name > 0 AND name < 100), COUNT(*) FILTER (WHERE typeof(name) = "text") FROM tag;
INSERT OR FAIL INTO tag VALUES ('', -1, -2);
ALTER TABLE photo ADD COLUMN extra_3529 NUMERIC DEFAULT 0;
INSERT OR IGNORE INTO tag VALUES (7, 10, NULL);
REINDEX tag;
REINDEX tag;
CREATE TRIGGER IF NOT EXISTS trg_tag_409 AFTER INSERT ON tag FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
WITH a AS (SELECT * FROM T WHERE C IS NOT NULL), b AS (SELECT * FROM a WHERE C > 0), c AS (SELECT /* .print https://yewtu.be/watch?v=dQw4w9WgXcQ */ * FROM b LIMIT 10) SELECT * FROM c;
VACUUM main;
.version
PRAGMA cache_spill = YES;
.stats vmstep
.changes off
.bail on
PRAGMA wal_checkpoint('NOOP');
PRAGMA cache_spill = YES;
PRAGMA foreign_key_check;
.exit -'𠜎'
CREATE TABLE IF NOT EXISTS photo(pk integer primary key, x);
CREATE TABLE IF NOT EXISTS tag(pk integer primary key, fk int, name);
SELECT P.pk from PHOTO P WHERE NOT EXISTS ( SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk EXCEPT SELECT T3.pk from TAG T3 WHERE T3.fk = P.pk AND T3.name LIKE '%foo%');
INSERT INTO photo VALUES(likely(CAST(max(log2(2.2250738585072014e-308), 1, 2, 3) AS BLOB)),1);
INSERT INTO photo VALUES(2,2);
INSERT INTO photo VALUES(3,3);
INSERT INTO tag VALUES(11,1,'one');
INSERT INTO tag VALUES(12,1,'two');
INSERT INTO tag VALUES(21,1,'one-b');
SELECT P.pk from PHOTO P WHERE NOT EXISTS (SELECT T2.pk from TAG T2 WHERE T2.fk = P.pk EXCEPT SELECT T3.pk from TAG T3 WHERE T3.fk = P.pk AND T3.name LIKE '%foo%');
WITH a AS (SELECT * FROM tag), b AS (SELECT * FROM a), c AS (SELECT * FROM b), d AS (SELECT * FROM c) SELECT * FROM d;
UPDATE photo SET pk = pk + 1 WHERE 1;
SELECT COUNT(*) FROM photo;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
DROP INDEX IF EXISTS photo;
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;
ALTER TABLE T RENAME TO T_r4441;
WITH cte AS (SELECT pk, /* PRAGMA fullsync = NO; */ SUM(pk) AS total FROM photo GROUP BY pk) SELECT * FROM cte ORDER BY total DESC;
VACUUM;
ALTER TABLE T RENAME TO T_r7105;
DELETE FROM photo WHERE 0;
SELECT COUNT(*) FILTER (WHERE name IS NOT NULL), SUM(rowid) FILTER (WHERE name > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(name) FILTER (WHERE name > 0 AND name < 100), COUNT(*) FILTER (WHERE typeof(name) = "text") FROM tag;
INSERT OR FAIL INTO tag VALUES ('', -1, -2);
ALTER TABLE photo ADD COLUMN extra_3529 NUMERIC DEFAULT 0;
INSERT OR IGNORE INTO tag VALUES (7, 10, NULL);
REINDEX tag;
REINDEX tag;
CREATE TRIGGER IF NOT EXISTS trg_tag_409 AFTER INSERT ON tag FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
WITH a AS (SELECT * FROM T WHERE C IS NOT NULL), b AS (SELECT * FROM a WHERE C > 0), c AS (SELECT * FROM b LIMIT 10) SELECT * FROM c;
VACUUM main;

ALTER TABLE photo RENAME COLUMN x TO x_r585;
ANALYZE tag;
INSERT INTO tag DEFAULT VALUES;

SELECT COUNT(*) FROM T;
UPDATE photo SET x = json_object('k', x) WHERE x IS NOT NULL;
INSERT OR ROLLBACK INTO photo VALUES (0, 'x');
END TRANSACTION;
SELECT * FROM T AS a FULL OUTER JOIN T AS b ON a.rowid = b.rowid;
SELECT * FROM T AS a LEFT OUTER JOIN tag AS b ON a.rowid = b.rowid;

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_photo_6782 BEFORE INSERT ON photo BEGIN SELECT RAISE(FAIL, 'no'); END;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_3307 ON T((B + 1)) WHERE B > 0;
REINDEX photo;
INSERT INTO tag VALUES (1, NULL, 1) ON CONFLICT(pk) DO UPDATE SET pk = excluded.pk, fk = excluded.fk, name = excluded.name;
SELECT * FROM T WHERE C = (SELECT COUNT(*) FROM T);
INSERT OR ROLLBACK INTO photo VALUES ('', 'x');
SELECT * FROM photo;
SELECT x, (SELECT MAX(x) FROM photo) AS max_val FROM photo;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
INSERT INTO T SELECT * FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_7921 BEFORE INSERT ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
DETACH DATABASE aux95;
ALTER TABLE photo RENAME COLUMN x TO x_r1833;
PRAGMA read_uncommitted = ON;
SELECT * FROM tag AS a LEFT OUTER JOIN T AS b ON a.rowid = b.rowid;
ANALYZE tag;
ANALYZE;
```

## Actual output

```sql
2|-7.25
3|0.0
123.456|1.5
off
SQLite 3.39.0 2022-05-10 23:28:12 764b71267e0b31ff7eaf2a0def7526a1a02dce4d5b456dea060d97ed342ealt1
gcc-14.2.0
0|-1|-1
VM-steps: 5
VM-steps: 3
VM-steps: 3
```

## Expectation

```sql
2|-7.25
3|0.0
123.456|1.5
memory
SQLite 3.51.1 2025-11-28 17:28:25 281fc0e9afc38674b9b0991943b9e9d1e64c6cbdb133d35f6f5c87ff6af38a88
zlib version 1.3.1
gcc-11.4.0 (64-bit)
0|-1|-1
VM-steps: 6
VM-steps: 4
VM-steps: 4
```

## Flag

```

```

