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)

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a51f-4078f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a51f-4078f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?