5
私はSQL Server 2008 R2を使用しています。over関数でpartition byとorder byを使う方法は?
私は、次を示すクエリを記述しようとしています:
select productname, unitprice,categoryid, sum(unitprice)
over (partition by categoryid order by unitprice desc) As PriceSum
from Products
は、私は彼らのカテゴリで製品を分割しながら、結果は、その単価で製品を注文したいです。このエラーが発生しました:Incorrect syntax near 'order'.
何が間違っていますか?