日期:2014-05-18 浏览次数:20656 次
select a.rq,b.maiID, sum(a.f1) as f1 from 主表 as a inner join 关系表 as b on a.subID=b.subID group by a.rq,b.maiID ------解决方案--------------------select sum(f1), rq from a join b on a.subID = b.subID group by rq