select pid,sum(a.innum)
from
( select * from pinto
union
select * from pout ) a
group by a.pid
select pid,sum(a.innum)
from
( select * from pinto
union
select * from pout ) a
group by a.pid
转载于:https://www.cnblogs.com/vov5601/p/4360369.html