## 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 TABLE T (
  a TEXT,
  b REAL
);
INSERT INTO T VALUES ('a',100.0), ('b',-200.5), ('c',9e999);
SELECT a,b,
LEAD(b,1) OVER (ORDER BY b DESC) AS c,
NTILE(2) OVER (ORDER BY b DESC) AS d FROM T;
.import employee.db main
.stats on
.shell pwd
.stats on
PRAGMA trusted_schema = TRUE;
.exit
PRAGMA compile_options;
-- json_object('k', {v})

((SAVEPOINT)) sp200;
CREATE TABLE T1 (
  A VARCHAR((CAST(-(-(rtrim('xxxhelloxxx', 'x'))) AS DECIMAL(if(rtrim(1, 'xyz'), NULL, 10),5)) * 1)),
  X VARCHAR(10),
  PRIMARY KEY (A, X),
  UNIQUE (X)
);
CREATE TABLE T2 (
  A VARCHAR(20),
  Y VARCHAR(10) UNIQUE,
  PRIMARY KEY (A, Y)
);
INSERT INTO T1 VALUES ('a', 'm');
INSERT INTO T1 VALUES ('b',
'n');
INSERT INTO T2 VALUES ('b', 'k');
SELECT A FROM T1 UNION ALL SELECT A FROM T2 ORDER BY A;

SELECT COUNT(*) FROM T1;
ROLLBACK TO sp200;
RELEASE sp200;
INSERT INTO T1 SELECT * FROM T1;
INSERT OR ABORT INTO T1 VALUES (NULL, 'x');
SELECT SUM(Y) FROM T2;
INSERT INTO T2 VALUES (NULL, NULL);
SELECT * FROM T1 WHERE (X) IN (SELECT  X FROM T1);
DELETE FROM T1 WHERE rowid = 27;
INSERT INTO T2 VALUES ('x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, Y = excluded.Y;
VACUUM main;
PRAGMA busy_timeout;
SELECT * FROM T1 CROSS JOIN T1;
ALTER TABLE T1 RENAME TO T1_r6840;
SELECT * FROM T2 WHERE Y IN (SELECT Y FROM T2 WHERE Y LIKE "%%");
VACUUM main;
ALTER TABLE T1 RENAME TO T1_r5447;
SELECT COUNT(A) FROM T1;
SELECT COUNT(*) FILTER (WHERE A IS NOT NULL), SUM(rowid) FILTER (WHERE A > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(A) FILTER (WHERE A > 0 AND A < 100), COUNT(*) FILTER (WHERE typeof(A) = "text") FROM T2;
CREATE TRIGGER IF NOT EXISTS trg_T1_9873 BEFORE UPDATE OF X ON T1 BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM T2 AS a JOIN T1 AS b ON a.rowid = b.rowid;
INSERT INTO T2 VALUES ('x', NULL) ON CONFLICT(A) DO UPDATE SET A = excluded.A, Y = excluded.Y;
SELECT COUNT(*) FROM T2;

SELECT COUNT(*) FROM T1;
DELETE FROM T2 WHERE A IS NULL RETURNING *;
ALTER TABLE T2 RENAME COLUMN Y TO Y_r5717;
UPDATE T2 SET A = CURRENT_TIMESTAMP;
REINDEX;
REINDEX;
ANALYZE;
INSERT OR IGNORE INTO T1 VALUES ('', '');
WITH cte AS (SELECT * FROM T2 WHERE A IS NOT NULL) SELECT * FROM cte;
INSERT INTO T1 VALUES ('x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, X = excluded.X;
INSERT OR ABORT INTO T1 VALUES ('x', 0);
DELETE FROM T2 WHERE A > (SELECT AVG(A) FROM T2);
```

## Actual output

```sql
c|Inf|100.0|1
a|100.0|-200.5|1
b|-200.5||2
/fuzzer
Memory Used:                         12258768 (max 25375760) bytes
Number of Outstanding Allocations:   2944 (max 2955)
Number of Pcache Overflow Bytes:     12168248 (max 12168248) bytes
Largest Allocation:                  13107100 bytes
Largest Pcache Allocation:           4360 bytes
Lookaside Slots Used:                37 (max 123)
Successful lookaside attempts:       888440
Lookaside failures due to size:      644
Lookaside failures due to OOM:       8
Pager Heap Usage:                    12120320 bytes
Page cache hits:                     846303
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Schema Heap Usage:                   1264 bytes
Statement Heap/Lookaside Usage:      2528 bytes
Fullscan Steps:                      0
Sort Operations:                     0
Autoindex Inserts:                   0
Virtual Machine Steps:               4
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        2528
Bytes received by read():            240161595
Bytes sent to write():               5492356
Read() system calls:                 58653
Write() system calls:                106695
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
```

## Expectation

```sql
c|Inf|100.0|1
a|100.0|-200.5|1
b|-200.5||2
/fuzzer
Memory Used:                         12282080 (max 25398912) bytes
Number of Outstanding Allocations:   2967 (max 2978)
Number of Pcache Overflow Bytes:     12190552 (max 12190552) bytes
Largest Allocation:                  13107100 bytes
Largest Pcache Allocation:           4368 bytes
Lookaside Slots Used:                58 (max 123)
Successful lookaside attempts:       888481
Lookaside failures due to size:      644
Lookaside failures due to OOM:       25
Pager Heap Usage:                    12142632 bytes
Page cache hits:                     846305
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Temporary data spilled to disk:      0
Schema Heap Usage:                   1072 bytes
Statement Heap/Lookaside Usage:      2528 bytes
Fullscan Steps:                      0
Sort Operations:                     0
Autoindex Inserts:                   0
Virtual Machine Steps:               5
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        2528
Bytes received by read():            240162115
Bytes sent to write():               5492356
Read() system calls:                 58653
Write() system calls:                106695
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
```

## Flag

```

```

