e***@gmail.com
2018-11-01 18:49:36 UTC
I was wondering if it's possible to build some kind of bean-query that
would produce output like the fava "Balance Sheet" view does. If you
haven't seen it, it looks like this:
https://fava.pythonanywhere.com/example-beancount-file/balance_sheet/ . It
shows the "net worth" of the beancount file over time.
You can get it per-account using `BALANCES AT COST FROM date < 2018-09-05`.
And using `EXPLAIN`, I was able to turn that into `SELECT
sum(cost(position)) WHERE account ~ '(Liabilities|Assets):.*' and date <
2018-09-05`, which works great for a single point in time. Finally I was
calculate to see month-to-month changes using `SELECT year(date),
month(date), sum(cost(position)) WHERE account ~
'(Liabilities|Assets):.*'`. But I don't have any way to produce a running
total (the sum of those changes up to each month).
Is there a bean-query mechanism for doing accumulation or "running count"
operations? I could "roll my own" using a subquery but I see from the
documentation that sub-selects aren't supported.
Thanks!
Ethan
would produce output like the fava "Balance Sheet" view does. If you
haven't seen it, it looks like this:
https://fava.pythonanywhere.com/example-beancount-file/balance_sheet/ . It
shows the "net worth" of the beancount file over time.
You can get it per-account using `BALANCES AT COST FROM date < 2018-09-05`.
And using `EXPLAIN`, I was able to turn that into `SELECT
sum(cost(position)) WHERE account ~ '(Liabilities|Assets):.*' and date <
2018-09-05`, which works great for a single point in time. Finally I was
calculate to see month-to-month changes using `SELECT year(date),
month(date), sum(cost(position)) WHERE account ~
'(Liabilities|Assets):.*'`. But I don't have any way to produce a running
total (the sum of those changes up to each month).
Is there a bean-query mechanism for doing accumulation or "running count"
operations? I could "roll my own" using a subquery but I see from the
documentation that sub-selects aren't supported.
Thanks!
Ethan
--
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 beancount+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/3d5d5726-9b2b-40f4-bfb3-596428953b35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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 beancount+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/3d5d5726-9b2b-40f4-bfb3-596428953b35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.