SQL Server 2008 R2 を使用しています。
以下を示すクエリを作成しようとしています。
select productname, unitprice,categoryid, sum(unitprice)
over (partition by categoryid order by unitprice desc) As PriceSum
from Products
製品をカテゴリ別に分割しながら、単価で製品を注文する結果が必要です。次のエラーが表示されます:Incorrect syntax near 'order'.
何が間違っていますか?