none
Help Query duplicate amount should removed

    Question

  • Hi all,

    Column Amount
    abc 50
    abc 100
    abc -100
    abc 100
    def 220
    def -220
    ghi 2200
    ghi 100
    klm 2
    klm 2

    and need output like this

    Column  Amount
    abc 150
    ghi 2300
    klm 4

    Thanks and Regards

    Monday, March 18, 2013 9:31 AM

Answers

  • Try the below:

    Select Column,Sum(Amount) From Table_Name

    Group by Column having Sum(Amount)<>0


    Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    • Marked as answer by Srikanthd5 Monday, March 18, 2013 9:49 AM
    Monday, March 18, 2013 9:33 AM