WHERE clauses are pushed down into the query planner before the SELECT list is processed, that’s why HAVING exists.
The logical order, in full, is:
FROM
WHERE/JOIN (you can join using WHERE clauses and do FROM a,b still)
SELECT
HAVING
The logical order, in full, is:
FROM
WHERE/JOIN (you can join using WHERE clauses and do FROM a,b still)
SELECT
HAVING
Something like a ‘let’ binding after the FROM/JOIN list would make sense, though - from the query planners perspective it’s nothing more than a token substitution and everything would compile the same.