## 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 TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',jsonb_object('k', ln(sqlite_compileoption_used(1.5)))), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 END) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
SELECT AVG(b) FROM T;
```

## Actual output

```sql
Parse error near line 6: no such function: jsonb_object
  INSERT INTO T VALUES ('a','b',jsonb_object('k', ln(sqlite_compileoption_used(1
                  error here ---^
```

## Expectation

```sql

```

## Flag

```

```

