SQL Server 2014中的SUM

您能帮我对数据库分区1中的“ Total_Profit”行的所有值求和吗?

select 
    Total_Profit,$partition.FUNCIONDEPARTICION2(Order_Priority) 
from 
    cliente 
where 
    $partition.FUNCIONDEPARTICION2(Order_Priority) = 1 

在此查询中,我已经显示了所有值,但是我不知道如何添加它们

hongge6767 回答:SQL Server 2014中的SUM

只需使用SUM()

select SUM(Total_Profit)
from cliente 
where $partition.FUNCIONDEPARTICION2(Order_Priority) = 1 
本文链接:https://www.f2er.com/3157830.html

大家都在问