Resolves the names of the given statements.
Every expression with its clause and scope, in source order.
Every select block's scope, in the order they were reached.
The CTE a table source names; null when it names a table or view.
The key two names compare equal under, by the dialect's case rules.
Resolves a column's qualifier (a in a.Name, dbo.T in dbo.T.Name) from scope
outwards; null when no visible source has that name.
Catalog-free name resolution over a document: which CTE each table name means, which FROM sources each select block sees under which names, and which source a column qualifier binds to (correlated subqueries see the sources of the queries around them).