Crystalboy1
Programmer
i got a table inwhich data is stored in this manner details given below.
Date Advances tradetype
20080801 100007.04 pwsweep
20080802 234567.56 pwrefund
20080802 237564.56 pwsweep
20080802 100.56 pwnlf-p
20080803 3000 pwnlf-d
20080803 300022 pwnlf-p
There are total of 5 types of tradetypes.
i want data stored in a view in the way details, example given below.
date advances writeoff other
20080801 2345566666 22222433 665456544
20080802 2345566666 22222433 665456544
20080803 2345566666 22222433 665456544
Please remember all the above figures are just examples are not the actual totoals or figures.
now the formulus to calculate advance is
to sum all advances the cash_trades tables group by date where tradetype = pwsweep,pwrefund,pwnlf-p
now the formulus to calculate writeoff is
to sum all advances the cash_trades tables group by date where tradetype = pwsweep,pwnlf-d
now the formulus to calculate other is
to sum all advances the cash_trades tables group by date where tradetype = pwrefund
hope someone wil help me with the select statement in the body of the view.
Date Advances tradetype
20080801 100007.04 pwsweep
20080802 234567.56 pwrefund
20080802 237564.56 pwsweep
20080802 100.56 pwnlf-p
20080803 3000 pwnlf-d
20080803 300022 pwnlf-p
There are total of 5 types of tradetypes.
i want data stored in a view in the way details, example given below.
date advances writeoff other
20080801 2345566666 22222433 665456544
20080802 2345566666 22222433 665456544
20080803 2345566666 22222433 665456544
Please remember all the above figures are just examples are not the actual totoals or figures.
now the formulus to calculate advance is
to sum all advances the cash_trades tables group by date where tradetype = pwsweep,pwrefund,pwnlf-p
now the formulus to calculate writeoff is
to sum all advances the cash_trades tables group by date where tradetype = pwsweep,pwnlf-d
now the formulus to calculate other is
to sum all advances the cash_trades tables group by date where tradetype = pwrefund
hope someone wil help me with the select statement in the body of the view.