## 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
.scanstats off
PRAGMA auto_vacuum = 2;
PRAGMA auto_vacuum = 2;
ATTACH DATABASE ':memory:' AS aux5;
PRAGMA cache_spill = YES;
.trace
.explain auto
CREATE TABLE T (
  a TEXT,
  b REAL
);
INSERT INTO T VALUES ((('a' || '') || ''),-(-(CAST(x'90c98b2643c65face8e17ced742863' AS FLOA)))), ('b',-x'cab722f381916b6a'), ('c',concat_ws('|', CAST(hex(12345678) AS NCHAR(55)), 3847074528100514708));
SELECT a,b,
LEAD(b,1) OVER (ORDER BY b DESC) AS c,
NTILE(2) OVER (ORDER BY b DESC) AS d FROM T;
BEGIN DEFERRED;
PRAGMA vdbe_trace = TRUE;
SAVEPOINT sp8548;
.quit
.backup
BEGIN DEFERRED;
PRAGMA secure_delete = mod(iif(-(-(1)), 1, 1), 1);
PRAGMA index_list(users);
PRAGMA read_uncommitted = NO;
.system echo "mwahaha i am root"
CREATE TABLE "t1"(a,b);
INSERT INTO t1 VALUES(123,('abc' || '')),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE `t2`(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE NOT NOT (a=234 OR x=987) ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE +a=234 AND x=555;
SELECT *, '|' FROM t1 /**/ LEFT JOIN t2 ON a=234 AND x=555;

SELECT LEAD(b) OVER (ORDER BY b ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
PRAGMA empty_result_callbacks = ON;
INSERT INTO t2 DEFAULT /* char(0) */ VALUES;
CREATE  VIEW IF NOT EXISTS v_t1_1882 AS SELECT a FROM t1;
SELECT LAG(a, 2, a) OVER (ORDER BY a ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM t1;
COMMIT TRANSACTION;
UPDATE t1 SET b = b + 1 WHERE rowid = 1;
SELECT * FROM t2;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
ROLLBACK TO sp8548;
RELEASE sp8548;
UPDATE t2 SET y = '' WHERE y BETWEEN 0 AND 100;
UPDATE t1 SET b = json_object('k', b) WHERE 1;
SELECT * FROM t2 t1 JOIN (SELECT * FROM t2) AS sub ON t1.y = sub.y;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t2 VALUES (NULL, NULL);
ALTER TABLE t2 ADD COLUMN extra_5002 VARCHAR(255) DEFAULT (abs(random()) % 1000);
SELECT MAX(x) FROM t2;
COMMIT;
ALTER TABLE t1 ADD COLUMN extra_5938 INTEGER DEFAULT '';
CREATE TABLE T (
  a INTEGER,
  b REAL,
  c REAL
);
INSERT INTO T VALUES (1,2.0,10.5), (1,-3.5,20.25), (2,9e999,-1.0);
WITH d AS (SELECT a,SUM(b*c) AS e FROM T GROUP BY a) SELECT * FROM d;
INSERT OR ABORT INTO T VALUES ('x', 0, '');
CREATE TRIGGER IF NOT EXISTS trg_t2_2743 BEFORE UPDATE ON t2 FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
SELECT * FROM t1 AS a LEFT JOIN t2 AS b ON a.rowid = b.rowid;
INSERT INTO T SELECT * FROM T;
ALTER TABLE t2 DROP COLUMN y;
ALTER TABLE t1 RENAME TO t1_r7798;
WITH cte AS (SELECT * FROM T) SELECT * FROM cte c1 JOIN cte c2 ON c1.a = c2.a;
ALTER TABLE t1 DROP COLUMN b;
ANALYZE;
UPDATE t2 SET x = json_object('k', x) WHERE x IS NOT NULL;
UPDATE T SET a = json_object('k', a) WHERE rowid = 1;
PRAGMA foreign_keys = 0;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), /* PRAGMA cell_size_check = OFF; */ COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
ALTER TABLE t1 RENAME TO t1_r7882;
ALTER TABLE t2 ADD COLUMN extra_465 INT2;
WITH cte AS (SELECT * FROM t2) SELECT * FROM cte c1 JOIN cte c2 ON c1.y = c2.y;
WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1) SELECT * FROM cnt;
ALTER TABLE t2 RENAME COLUMN x TO x_r1764;
CREATE  VIEW IF NOT EXISTS v_t1_8598 AS SELECT b FROM t1;
WITH cte AS (SELECT CASE WHEN y > 0 THEN "pos" ELSE "neg" END AS sign FROM t2) SELECT * FROM cte; /**/ PRAGMA legacy_alter_table = 1;

SELECT COUNT(*) FROM t1;
ANALYZE t2;
CREATE TABLE T (
  a INTEGER,
  b REAL
);
INSERT INTO T VALUES (1,1.5), (2,-7.25), (3,0.0);
SELECT a,b FROM T WHERE a >= 2 ORDER BY b;
INSERT INTO T SELECT * FROM T;
INSERT INTO t2 SELECT * FROM t2;
SELECT * FROM t1;
WITH cte AS (SELECT a, SUM(a) AS total FROM t1 GROUP BY a) SELECT * FROM cte ORDER BY total DESC;
INSERT INTO t1 VALUES (NULL, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t2_9081 ON t2(lower(y));
INSERT OR REPLACE INTO t1 VALUES ('x', 0);
SELECT COUNT(b) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_t2_7742 BEFORE UPDATE OF x ON t2 FOR EACH ROW BEGIN INSERT INTO t2(x) VALUES (NULL); END;
DETACH DATABASE aux5;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_2522 ON T((a + 1));
INSERT INTO t1 VALUES (NULL, NULL);
SELECT * FROM t1 AS a FULL OUTER JOIN T AS b ON a.rowid = b.rowid;
DELETE FROM t1 WHERE 1 RETURNING *;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_3837 ON T(a COLLATE NOCASE) WHERE a IS NOT NULL;
INSERT INTO t1 VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t2_5126 AS SELECT y FROM t2;
ALTER TABLE t1 RENAME COLUMN a TO a_r69;
SELECT GROUP_CONCAT(a) OVER (ORDER BY a ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T;
ALTER TABLE t1 ADD COLUMN extra_789 NCHAR(55) DEFAULT (abs(random()) % 1000);
UPDATE t1 SET a = 'x' WHERE rowid = 1;
VACUUM;
DELETE FROM t2 WHERE 0;
```

## Actual output

```sql
Warning: .scanstats not available in this build.
Parse error near line 12: no such function: concat_ws
  63' AS FLOA)))), ('b',-x'cab722f381916b6a'), ('c',concat_ws('|', CAST(hex(1234
                                      error here ---^
```

## Expectation

```sql

```

## Flag

```

```

