hi,i have to tables t1 and t2.the tables look like this:t1id1(int) wert1(int)1 101 101 102 152 153 53 53 53 154 30 t2id2(int) wert2(int)1 11 23 32 12 12 14 24 1
now i want to display this result:id1 sum(wert1) sum(wert2)1 30 32 30 33 30 34 30 3
(this would take for each id the sum of wert1 and the sum of wert2)i tried it with this command:selectid1,sum(wert1),sum(wert2)from t1left join t2 on t2.id2 = t1.id1group by id1
but the result is this:id1 sum(wert1) sum(wert2)1 60 92 90 63 30 124 60 3
it takes for each value in t1 each value in t2 and so it sumize the whole columns.i'm not sure, maybe it is simple. but now, i dont came to the sollution. please help my tired brain..