How Do i Achieve the below mentioned requirement????

Kindly find the attached doc to understand my requirement. And please help. I didn’t explain the matter here in the post because in excel i have explained my requirement clearly. Two sample reports are there. One is the current report and another one is the requirement that i need to create. Please go through it and let me know any possible solution for the same.
Example.xls (19.0 KB)


BO_User2000 (BOB member since 2008-11-18)

Hi,
Which database you are on?
It might be achieved using the stored procedure or a function.


Omkar Paranjpe :us: (BOB member since 2006-02-13)

I am working on SQL Server 2000. Could you please explain your idea a bit. Would be helpful if it is with an example. One more thing, all these data are comming from a single table. I was thinking about a derive table to do all the calculations.


BO_User2000 (BOB member since 2008-11-18)