I have to tables:
Incomes:
| date | incomeAmount |
Expenses:
| date | expenseAmount |
I would like to sum all my incomes in an especific month using: MONTH(date) = ?
I also need to sum all my expenses in this same month
Then subtract to obtain my profit in the month, with an output table similar to that:
| Month | TotalIncomes | TotalExpenses | Profit |
How can I create a SQL Query in order to do this? Thank you for all the help!