Try something like
select root(account, 2), sum(position)
or if you need more things you can also do a group by root(account, 2)
On 13.01.2022 18:18, nug get wrote:
Dear all,
I'd like to make expenses statements on my 1st level accounts, e.g.
accounts that look like "Expenses:Mainaccount" but none of their child
accounts. This should sum up all the values of the individual child
accounts.
The following query provides the total expenses of any leaf account,
but not of the main accounts:
SELECT account, sum(position)
WHERE account ~ 'Expenses:[^:]*'
ORDER By account DESC
How do i need to modify this above query in order to get the balances
of the main accounts?
Thanks!
nugget
--
You received this message because you are subscribed to the Google
Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/cf33013e-dac9-430a-bea1-e5ec6d53d296n%40googlegroups.com
<https://groups.google.com/d/msgid/beancount/cf33013e-dac9-430a-bea1-e5ec6d53d296n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/81276fd0-eb0e-a224-397c-5ccc79f7f91b%40ch.tario.org.