SELECT
bp.project_id,
bp.project_name,
bp.project_costing,
bp.project_borrower_id,
bp.member_userid,
bp.project_staus,
SUM(pb.payment_amount) as total
FROM borrower_project_master as bp
INNER JOIN payment_invest_master as pb ON bp.project_borrower_id=pb.payment_borrowerid
WHERE (
(SUM(pb.payment_amount)/bp.project_costing)*100 < 100
AND bp.project_staus='Y'
)
ORDER BY RAND() LIMIT 0,3
此查询显示错误 Invalid use of group 函数。你能帮我解决这个问题吗