## 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 aux37;
PRAGMA defer_foreign_keys = TRUE;
PRAGMA encoding = 'utf-16';
-- PRAGMA module_list;

CREATE TABLE t1(abcd, efgh);
INSERT INTO t1 VALUES (hex(NULL), timediff(CAST(0 AS NCHAR(55)), 0));
CREATE VIEW v1 AS SELECT * FROM t1 WHERE abcd>efgh;

CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_3742 ON t1(efgh COLLATE NOCASE);
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t1_511 AS SELECT efgh FROM t1;
REINDEX t1;
SELECT * FROM t1 WHERE efgh > (SELECT AVG(efgh) FROM t1);
SELECT AVG(efgh) FROM t1;
DELETE FROM t1 WHERE 0;

SELECT COUNT(*) FROM t1;
DETACH DATABASE aux37;
ALTER TABLE t1 RENAME COLUMN abcd TO abcd_r4633;
ANALYZE t1;
```

## Actual output

```sql
0
```

## Expectation

```sql

```

## Flag

```

```

