I need the MoneyAmountAvg column to have a value of MoneyAmount/(# of times that organization shows up)
So for example, the MoneyAmountAvg column for the ISD rows would have a value of 100.
QWE would have 125 for each row in the MoneyAmountAvg column and OLP would have a value of 800 since it is there only once.
This is only an example table. The actual table is much bigger and has more organizations, but it has the same criteria. Some organizations have multiple rows, while others are there only once.
I just need a way for it to count how many times each organization is listed when I use an update statement for that organization's MoneyAmountAvg column. Hard coding it for each organization is definitely not an option since they can change at any moment.
Why do you want to have this MoneyAmountAvg column in the same table?
Why not to move it to another table or view? Or if it is much more complicated than in your example then create a stored procedure returning a user defined table type?