insert into B
select a.id,b.cd_zt=(a.cd+a.zt),b.wdk=sum(c.*) from a inner join b on a.id=c.id where month(c.udt)=12 and year(c.udt)=2003 and c.kqid='999'
group by a.id,(a.cd+a.zt)