Average Population

  • + 2 comments

    Your comment doesn't actually address the problem. The problem is: using the AS keyword when aliasing a table is perfectly valid T-SQL syntax yet the submission produces errors.

    I alias tables regardless of necessity because I feel it is a best practice and also does not affect the performance of the query in any negative way. To your second point, consider the following (which fails): SELECT c.ID FROM City AS c. The alias is referenced in the SELECT query-part which, in terms of the T-SQL interpreter, is compiled after the FROM query-part where the alias is defined.