问题描述
- IT大神们帮看下什么情况
-
SELECT SUM(recivedPrincipal) AS 'leiji_invest_sum',COUNT(id) AS 'leiji_count',MAX(repayDate) AS 'lately_gathering_date',a.*,c.*
FROM t_invest v LEFT JOIN
(SELECT investor AS 'inv',SUM(recivedPrincipal+recivedPrincipal) AS 'yishou_sum',SUM(recivedPrincipal) AS 'yishou_principal',
SUM(recivedPrincipal) AS 'yishou_lixi',SUM(recivedFI) AS 'yioverdue_lixi' FROM t_invest WHERE investor=4 AND repayStatus IN (1,2)) a
ON v.investor = a.inv
LEFT JOIN (SELECT investor,SUM(recivedPrincipal+recivedPrincipal) AS 'daishou_sum',SUM(recivedPrincipal) AS 'daishou_principal',
SUM(recivedPrincipal) AS 'lixi',SUM(recivedFI) AS 'overdue_lixi' FROM t_invest WHERE investor=4 AND repayStatus =3 ) c
ON v.investor = c.investor
WHERE v.investor=4 ORDER BY v.investTime DESC 这是原代码,后台报错是 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT SUM(recivedPrincipal) AS 'leiji_invest_sum',COUNT(id) AS 'leiji_count',MA' at line 1 这是什么原因
解决方案
AbandonedObjectPool is used什么情况?
这些技能你两周能不能学会,以此来检测你将来是否有潜力成为IT大神
这些技能你两周能不能学会,以此来检测你将来是否有潜力成为IT大神
解决方案二:
SELECT investor,SUM(recivedPrincipal+recivedPrincipal) AS 'daishou_sum',SUM(recivedPrincipal) AS 'daishou_principal',
SUM(recivedPrincipal) AS 'lixi',SUM(recivedFI) AS 'overdue_lixi' FROM t_invest WHERE investor=4 AND repayStatus =3 这里有sum函数 但是没有group by
时间: 2025-01-20 12:31:48