SQLite Forum

Inconsistent behavior when using nth_value and COUNT
Login
It seems that an update of code is being proposed <https://sqlite.org/src/info/0d11d777c8d368f0>, that block the aggregation function such as COUNT in the ORDER BY clause. The latest code clear some of the confusions we asked in the original thread  <https://sqlite.org/forum/forumpost/5d3d400d49>. However, when testing the latest commit with the query being questioned in this thread, we still see the inconsistency that 4 matches being returned from STMT 2. We wonder whether this output is an expected behavior.