sql server - Query to loop through a column and calculate totals for each unique record -
this might better done script, hoping can done query.
i have table called ledger. looks (simplified):
patid amount 100 2500 100 1700 100 700 110 500 110 -75 120 350 can query @ table , return single line each patid correct total based on amount field?
in case, want report:
patid amount 100 4900 110 425 120 350 thanks!
Comments
Post a Comment