You coud use inner join , sum and group by
select a.order_ID, sum(a.quantity * a.rate) + b.ship_chr as total_amount
from table2 a
inner join table1 b on a.order_ID = b.order_ID
group by a.order_ID, b.ship_chr
or using a suquery for the sum
select t1.order_ID, t1.tot + b.ship_chr total_amount
from table1 b
inner join (
select a.order_ID, sum(a.quantity * a.rate) tot
from table2 a
group by a.order_ID
) t1 on t1.order_ID = b.order_ID
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…