SQLite Forum

How to convert to CTE
Login
Then your definition of what to count is incorrect.