Traditionally in SQL, the main clauses are evaluated as:
Among other things, it explains why you can’t use alias from the
SELECT clause in other clauses such as
GROUP BY, since they aren’t processed till later; it also explains why you can use them in the
ORDER BY clause.
Except for SQLite. Aliases can be used in the rest of the clauses, which suggests the the above evaluation doesn’t hold true in SQLite. Instead it appears to be:
I can’t find any mention, let alone confirmation, anywhere in the documentation.
Is the alternative evaluation correct, and where is this documented?