Hi,
I'm generating an income statement (with only my expenses) like this:
SELECT account, sum(position) FROM OPEN ON 2023-03-01 CLOSE ON 2023-03-30 WHERE account ~ "Expenses" GROUP BY 1 ORDER BY 1
But I have some subdivisions of my accounts that I would like to report one level up.
For example, now I get the following output:
...
Expenses:Gifts:JohnDoe 50 USD
Expenses:Gifts:JaneDoe 25 USD
...
And I would like to have:
...
Expenses:Gifts 75 USD
...
Is there a way to aggregate the accounts using beanquery?
Thank you.