I am having data of table dummy as below:
Name amount amount1
-----------------------------------------------
mahesh 1200 Null
mahesh 1000 Null
mahesh Null 25000
mahendra 1200 Null
Kirti null 22000
I am trying to prepare a list like below:
Name amount amount1
-----------------------------------------------
mahesh 22800
mahendra 1200
kirti 22000
How to do it?
what is sql transact?
Looks like you’re adding numbers where
amountis negative andamount1is positive. You can do that with agroup by. Acasecan help place the resultingsumin the right column: