Requesting some assistance with first server-script

Hi

Please be patient if you see stuff that is really “beginner-stuff” but this is my first
little scripty.

My server:
ERPNext: v12.10.1 (version-12)

Frappe Framework: v12.8.4 (version-12)

My goal:
To write my own modified P&L report.

So far:
Have created new report with the underlying file-structure that was created.

Herewith some screen-shots …
Code…

Herewith a screenshot of my screen when I return the “expenses” values

Herewith a screenshot of my screen when I return the "income values

My question:
I believe the values : “expense”, “income”, expense_total" and “income_total” are tuples?

When I try and return more than one tuple, the columns on my screen does not get populated.
I have tried enclosing it in brackets to.

I have tested my sql statements in BENCH MARIADB and they return the correct data.

I would appreciate some assistance with returning my data.

Thank you