Hello, We found an assertion failure in the latest SQLite, and the test case is as follows: ``` CREATE TABLE t1(a); SELECT MIN((SELECT NULL FROM t1 UNION SELECT 'X' FROM (SELECT NULL FROM (SELECT 1 WHERE t1.a=1) UNION ALL SELECT 'X' FROM (SELECT 2)))) FROM t1; ``` which triggers: > sqlite3.c:139665: sqlite3Select: Assertion `pExpr->pAggInfo==pAggInfo' failed. Bisecting shows the issue may be introduced in [check-in 7682d8a768](https://sqlite.org/src/info/7682d8a768).