## 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
.explain on
ATTACH DATABASE ':memory:' AS aux76;
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',trim(sqlite_compileoption_get(if(1, 100, 1/0)), 'xyz')), ('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;
REINDEX T;
DETACH DATABASE aux76;
INSERT OR IGNORE INTO T VALUES (-3, NULL, 'x');

SELECT COUNT(*) FROM T;
PRAGMA optimize(0x00002);
SELECT SUM(c) FROM T;
```

## Actual output

```sql
COUN
----
1
SUM(
----
0.0
```

## Expectation

```sql

```

## Flag

```
-markdown
```

