标签: sql sql-server sql-server-2008 aggregate-functions database-partitioning
拥有这段SQL代码:
MIN([Price]) OVER (PARTITION BY [Brand], [Article]) AS MinPrice,
问题:如何从MIN()中排除某些记录,其中a.e。 [Supplier] != 10?
MIN()
[Supplier] != 10
答案 0 :(得分:3)
将WHERE [Supplier] != 10添加到您的查询中。
WHERE [Supplier] != 10