One table statistics, and then the fields are used as conditional queries for another table statistics.

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

Apr.11,2021

is not very clear, but I guess you want select field from tableName where field in (select field from tableName group by field)

.
Menu