## 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
SAVEPOINT sp6148;
ATTACH DATABASE ':memory:' AS aux48;
ATTACH DATABASE ':memory:' AS aux49;
SAVEPOINT sp2178;
ATTACH DATABASE ':memory:' AS aux22;
CREATE TABLE person (org_id TEXT NOT NULL, nickname        TEXT NOT NULL, license         TEXT, CONSTRAINT person_pk PRIMARY KEY (org_id, nickname), CONSTRAINT person_license_uk UNIQUE (license) );
INSERT INTO person VALUES('meyers', 'jack', '2GAT123');
INSERT INTO person VALUES('meyers', 'hill', 'V345FMP');
INSERT INTO person VALUES('meyers', 'jim', '2GAT138');
INSERT INTO person VALUES('smith', 'maggy', '');
CREATE TABLE t2(a PRIMARY KEY, b);
INSERT INTO t2 VALUES('abc', 'xxx');
INSERT INTO t2 VALUES('def', 'yyy');
SELECT org_id, count((NOT (org_id IS NULL)) AND (NOT (nickname IS NULL))) FROM person WHERE (CASE WHEN license != '' THEN (json_valid(octet_length(''), 1) + 0.0) ELSE 0 END) GROUP BY 1;
SELECT a, max(b || a) FROM t2 WHERE (b||b||b)!='value' GROUP BY a;


SELECT * FROM person t1 LEFT JOIN person t2 ON t1.nickname = (SELECT nickname FROM person WHERE nickname = t1.nickname);
SELECT * FROM person AS a JOIN person AS b ON a.rowid = b.rowid;
DELETE FROM person WHERE 0;
SELECT * FROM person AS a JOIN t2 AS b ON a.rowid = b.rowid;
DETACH DATABASE aux22;
RELEASE sp2178;
DETACH DATABASE aux49;
DETACH DATABASE aux48;
WITH cte(x) AS (VALUES(1),(2),(3)) SELECT * FROM cte WHERE x > 1;
SELECT TOTAL(b) FROM t2;
ROLLBACK TRANSACTION TO SAVEPOINT sp6148;
RELEASE SAVEPOINT sp6148;
```

## Actual output

```sql
abc|xxxabc
def|yyydef
meyers|jack|2GAT123|meyers|jack|2GAT123
meyers|jack|2GAT123|meyers|hill|V345FMP
meyers|jack|2GAT123|meyers|jim|2GAT138
meyers|jack|2GAT123|smith|maggy|
meyers|hill|V345FMP|meyers|jack|2GAT123
meyers|hill|V345FMP|meyers|hill|V345FMP
meyers|hill|V345FMP|meyers|jim|2GAT138
meyers|hill|V345FMP|smith|maggy|
meyers|jim|2GAT138|meyers|jack|2GAT123
meyers|jim|2GAT138|meyers|hill|V345FMP
meyers|jim|2GAT138|meyers|jim|2GAT138
meyers|jim|2GAT138|smith|maggy|
smith|maggy||meyers|jack|2GAT123
smith|maggy||meyers|hill|V345FMP
smith|maggy||meyers|jim|2GAT138
smith|maggy||smith|maggy|
meyers|jack|2GAT123|meyers|jack|2GAT123
meyers|hill|V345FMP|meyers|hill|V345FMP
meyers|jim|2GAT138|meyers|jim|2GAT138
smith|maggy||smith|maggy|
meyers|jack|2GAT123|abc|xxx
meyers|hill|V345FMP|def|yyy
2
3
0.0
```

## Expectation

```sql

```

## Flag

```

```

