SELECT c. Xitongshijian SELECT (c.zongyeji) FROM count_report c group by c. Xitongshijian;
statistics the total performance according to the time groups of count_report, and then query the total performance of another table according to the time of xitongshijian.
finished
select t1.xitongshiji on t1.xitongshijian=t2.xitongshijian t1.zyj from (SELECT xitongshijian,sum (zongyeji) as zyj FROM count_report group by xitongshijian) 2.xf
T1 left join (select xitongshijian,sum (xiaofei) as xf from shangwutong group by xitongshijian) T2 on t1.xitongshijian=t2.xitongshijian