如何将这两个命令总结为一个命令?
SELECT userName,userId, SUM(amount) AS total_debit FROM debts where buyerId!=userId GROUP BY userName ORDER BY userId
SELECT buyer,userId, SUM(amount) AS total_credit FROM debts where buyerId!=userId GROUP BY buyer ORDER BY userId
SELECT buyer,userId, SUM(amount) AS total_credit FROM debts where buyerId!=userId GROUP BY buyer,userId ORDER BY buyer,userId