Log in

View Full Version : Count value with parent -id



hemi519
08-22-2012, 09:48 AM
Hi All,

Can anyone help me regarding the following issue

/*

P-Id --- C-Id ---- AMT
3206 -- 2197 -- 253
3206 -- 8433 -- 333
3206 -- 8433 -- 10
3206 -- 8433 -- 10
2483 -- 4318 -- 200
2483 -- 4318 -- 100
2483 -- 4318 -- 50
9754 -- 2220 -- 10
9754 -- 2220 -- 50
9754 -- 6070 -- 10
9754 -- 5833 -- 70
9754 -- 5007 -- 100

*/

(P-Id is parent id and c-Id is child id)

Now here i wan to have sum of each parent-id. How can i get it? I am not getting those values from one table. All those P-id values are stored in an array.