Hello developers, We found an assertion failure in SQLite version 3.37.0 2021-11-02 07:32:13 with debug enabled. The test case is as follows: ``` CREATE TABLE t1(a TEXT AS(1>=1),b CHAR(1)); CREATE INDEX t1ab ON t1(a,b); SELECT * FROM t1 WHERE (a, b) IN (SELECT count(CASE WHEN t1.b='xyz' THEN 10 END), COUNT(*) AS ca0 FROM t1 AS ra0) AND t1.b=0; ``` which causes: > sqlite3.c:137964: isSimpleCount: Assertion `0' failed. in line: > if( NEVER(pAggInfo->nFunc==0) ) return 0; Bisecting shows the issue may be related to [check-in e994c9f2](https://sqlite.org/src/info/e994c9f29f). Hope the problem will be handled properly :)