Trying to sum distinct values SQL

后端 未结 3 1664
隐瞒了意图╮
隐瞒了意图╮ 2021-01-02 02:03

I\'m having trouble coming up with a value for a cell in SSRS, which should be a sum of distinct values. I have a SSRS report that looks similar to the below screenshot:

3条回答
  •  执笔经年
    2021-01-02 02:40

    Get the distinct list first...

    SELECT SUM(SQ.COST)
    FROM
    (SELECT DISTINCT [Tracking #] as TRACK,[Ship Cost] as COST FROM YourTable) SQ
    

提交回复
热议问题