楼上那样好像还有点问题吧,
declare @my_sum int
select my_id,my_sum=sum(my_sum) into mytable3 from mytable2 where left(my_date,6)='200506' group by my_id
select a.my_name,b.my_sum
from mytable1 as a,mytable3 as b
where a.my_id=b.my_id
and b.my_sum >90
不好意思,你的表字段内容太复杂了,这次测试过了