大概语法就这样,参考拓展吧!
select t.`物品` ,sum(t.`数量`) as `数量` from ( select `物品`,`数量` from tab_a union all select `物品`,`数量` from tab_b ) t group by t.`物品`