SQLite Forum

When is SELECT ... FROM with no table-or-subquery valid.
Login
And remember that at the top of the [SELECT page](https://www.sqlite.org/lang_select.html) it states:

Note that there are paths through the syntax diagrams that are not allowed in practice. Some examples:

* A VALUES clause can be the first element in a compound SELECT that uses a WITH clause, but a simple SELECT that consists of just a VALUES clause cannot be preceded by a WITH clause.
* The WITH clause must occur on the first SELECT of a compound SELECT. It cannot follow a compound-operator. 

These and other similar syntax restrictions are described in the text.