Subtraction sum of 2 tables

Hi there,

I have a database with 2 tables i am trying to subtract the sum of 1 table column from the sum of the other table column.

I have done this in the the SQL run query (image D1)

and the result i got was (image D2) which is correct

How do i echo this total ?


Your real problem is your DB design. You should only have one table for income/expenses.

Sponsor our Newsletter | Privacy Policy | Terms of Service