Hi Experts,
I have two table called T1 and T2
T1
shipid--------------amount
1 -------------------- 100
2-------------------- 10
3-------------------- 50
T2
Artist--------------------shipid
A1----------------------------2
A1----------------------------3
A2----------------------------1
My OutPut will be sum(amount) group by Artist
that is,
A1-------------60
A2-------------10
For that i am using
my $cStr="select sum(t1.amount) from t1,t2 group by t2.artist";
but it is not working.
Is any Idea,
I have two table called T1 and T2
T1
shipid--------------amount
1 -------------------- 100
2-------------------- 10
3-------------------- 50
T2
Artist--------------------shipid
A1----------------------------2
A1----------------------------3
A2----------------------------1
My OutPut will be sum(amount) group by Artist
that is,
A1-------------60
A2-------------10
For that i am using
my $cStr="select sum(t1.amount) from t1,t2 group by t2.artist";
but it is not working.
Is any Idea,
Comment