insett into tab2
select workitem,max(tab1.note),sum(money) from 
tab2 left outer join tab1 on tab2.workitem=tab1.workitem
left outer join tab3 on tab2.workitem=tab3.workitem
group by tab3.workitem