I'd like to know what's the correct SQL statement to do the following:
update t1 aset a.amount = sum(b.amount)from t2 bwhere a.id = b.id