doctrine/dbal — pull request #371 by Ocramius (2013-09-15 06:26:19+00:00)
Title: DDC-2662 - SQLServer expects the `OVER` clause to only include columns from the `FROM` clause

DDC-2662 - SQLServer expects the `OVER` clause to only include columns from the `FROM` clause

As of http://technet.microsoft.com/en-us/library/ms189461.aspx :

`order_by_expression:

> Specifies a column or expression on which to sort. order_by_expression can only refer to columns made available by the FROM clause. An integer cannot be specified to represent a column name or alias.

That basically means that table aliases used to fetch the selected columns should NOT be included in the `OVER` clause.