G
Guest
I'm looking the the SQL that will provide a running total in my data. I want the CumlAmount column to be a running sum of PymtAmount field for each SSN group. The data looks like this:
SSN PymtDate PymtAmount CumlAmount
585042115 1/31/05 $17,000.00 $17,000.00
585042115 1/31/06 $17,000.00 $34,000.00
585042115 1/31/07 $17,000.00 $51,000.00
585042115 1/31/08 $17,000.00 $68,000.00
012345678 1/31/06 $10,000.00 $10,000.00
012345679 1/31/07 $10,000.00 $20,000.00
012345680 1/31/08 $10,000.00 $30,000.00
012345681 1/31/09 $10,000.00 $40,000.00
Could someone provide the SQL to complete this task? Thanks!
SSN PymtDate PymtAmount CumlAmount
585042115 1/31/05 $17,000.00 $17,000.00
585042115 1/31/06 $17,000.00 $34,000.00
585042115 1/31/07 $17,000.00 $51,000.00
585042115 1/31/08 $17,000.00 $68,000.00
012345678 1/31/06 $10,000.00 $10,000.00
012345679 1/31/07 $10,000.00 $20,000.00
012345680 1/31/08 $10,000.00 $30,000.00
012345681 1/31/09 $10,000.00 $40,000.00
Could someone provide the SQL to complete this task? Thanks!