SQLite Forum

Reference to RECURSIVE table column apparently not allowed in nested SELECT
Login
Correct.

Quoting from [the documentation][1]:

> \[T\]he recursive table must appear exactly once in the FROM clause of each top-level SELECT statement in the recursive-select and must not appear anywhere else in either the initial-select or the recursive-select, including subqueries.

[1]: https://www.sqlite.org/lang_with.html

I think you will find a similar limitation in the recursive common table
expression implementation of every other SQL RDBMS out there.  If you find
another that will let you do what you demonstrate, please let me know.