Home > Mobile >  How to sum multiple columns?
How to sum multiple columns?

Time:12-06

my question is: is it possible to sum multiple columns and get the total of every column? I'm using this query:

SELECT borrower, SUM(collateral_amount) AS collateral_amount, SUM(withdraw_amount) AS withdraw_amount, SUM(total_amount_to_treasure) as total_amount_to_treasure, SUM(id) as id 
FROM loans 
GROUP BY borrower

But that result is not what I want

  • Related